struct task_struct {

int link_count, total_link_count;

/* filesystem information */ struct fs_struct *fs; /* open file information */

struct files_struct *files; /* namespaces */

struct nsproxy *nsproxy;

The integer elements link_count and total_link_count are used to prevent endless loops when looking up circularly chained links as I will demonstrate in Section 8.4.2.

The filesystem-related data of a process are stored in fs. These data include, for example, the current working directory and information on chroot restrictions, which I discuss in Section 8.3.4.

Since the kernel allows for simultaneously running multiple containers that mimic independent systems, every resource that seems ''global'' to the container is wrapped up by the kernel and separately managed for every container. The virtual filesystem is also affected because each container can face a different mount hierarchy. The corresponding information is contained in ns_proxy->mnt_namespace (see Section 8.3.4).

files contains the process file descriptors examined in the section below.

Continue reading here: Associated Files

Was this article helpful?

0 0