Question: LINUX : ------------------------------- Write a pseudo code that prints failed when a fork() is failed and prints child in the child process, if a fork
LINUX:


-------------------------------
Write a pseudo code that prints failed when a fork() is failed and prints child in the child process, if a fork is successful.
#/pthread > void work(char * name) { printf("%s process ", name); int main (0 time_t now; pid t pid; if ((p.d = fork() ) 0) //parent process work ("main"); sleep(10); printf"bye parentIn"); else if (pid0) // child process work ("child"); sleep(20); printf"bye child ")
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
