Embedded Software Engineer Question: Download Embedded Software Engineer PDF

Tell me how to create a child process in linux?

Tweet Share WhatsApp

Answer:

☛ Prototype of the function used to create a child process is pid_t fork(void);
☛ Fork is the system call that is used to create a child process. It takes no arguments and returns a value of type pid_t.
☛ If the function succeeds it returns the pid of the child process created to its parent and child receives a zero value indicating its successful creation.
☛ On failure, a -1 will be returned in the parent's context, no child process will be created, and errno will be set.
☛ The child process normally performs all its operations in its parents context but each process independently of one nother and also inherits some of the important attributes from it such as UID, current directory, root directory and so on.

Download Embedded Software Engineer PDF Read All 100 Embedded Software Engineer Questions
Previous QuestionNext Question
Tell me what is the need for DMAC in ES?Tell me what are the commonly found errors in Embedded Systems?