Child Parent Relationship and Inheritance in C

后端 未结 5 1212
走了就别回头了
走了就别回头了 2021-02-03 12:52

I am totally new with C.

  1. What are the process items that are inherited in a child created using fork();?

  2. What are the process items

5条回答
  •  旧巷少年郎
    2021-02-03 13:25

    The only things of child that are different its parent are its

    PPID i.e parent process id and

    PID process id.

    And when it comes to similarity child process inherits its parent's FILE DESCRIPTOR table thus you would see that always three FILE DESCRIPTORS of child are always occupied which correspond to STDIN,STDOUT and STDERR.

提交回复
热议问题