| | |
fork twice ???
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jul 2008
Posts: 19
Reputation:
Solved Threads: 0
how many processes will be created when i fork() twice .
Is this logic correct ?
the 1st fork will spawn child C1 which is a child of the parent process P.
the code segment of the parent P is inherited by C1.
the 2nd fork is called by both P and C1.
P gets another child C2 and C1 its first child C3.
Is this logic correct ?
the 1st fork will spawn child C1 which is a child of the parent process P.
the code segment of the parent P is inherited by C1.
the 2nd fork is called by both P and C1.
P gets another child C2 and C1 its first child C3.
![]() |
Similar Threads
- fork() and wait() (C)
- the difference of using fork() and exec() with system() (C++)
- Unix, C++, pipe and fork (C++)
- fork() updating a taskTable (C)
- Fork and exec to run external needed app (C++)
Other Threads in the C Forum
- Previous Thread: strtok() problem
- Next Thread: Removing an item from head of linked list
| Thread Tools | Search this Thread |
Tag cloud for C
#include * append array arrays asterisks bash binarysearch calculate changingto char character cm command copyimagefile creafecopyofanytypeoffileinc createprocess() database directory dynamic execv feet fgets file floatingpointvalidation fork forloop framework function functions getlogicaldrivestrin givemetehcodez global grade graphics gtkwinlinux hacking histogram homework ide include incrementoperators input intmain() iso kernel keyboard kilometer lazy license linked linkedlist linux list lists looping loopinsideloop. lowest matrix meter microsoft mqqueue number oddnumber odf openwebfoundation overwrite pause pdf pointer posix process program programming radix recursion recv recvblocked research reversing segmentationfault sequential single socket socketprogramming spoonfeeding standard strchr string student system testing threads turboc unix urboc user variable whythiscodecausesegmentationfault windowsapi






