Before analyze the p_1.log, we firstly talk about the clone.(Actually on linux that fork is implemented as clone, so we focus on clone system call.)
“clone” selectively clone the resources from parent, let us list the main resources belong to one process.
struct task_struct {
...
struct mm_struct *mm, *active_mm; /*CLONE_VM*/
...
struct fs_struct *fs;/*CLONE_FS*/
...
struct files_struct *files;/*CLONE_FILES*/
...
struct signal_struct *signal;
struct sighand_struct *sighand;/*CLONE_SIGHAND*/
...
struct io_context *io_context;/*CLONE_IO*/
...
struct nsproxy *nsproxy;/*CLONE_NEWNS*/
...
struct sysv_sem sysvsem;/*CLONE_SYSVSEM*/
...
struct thread_struct thread;
...
}


