| | |
How to record the order in which the child processes finish
![]() |
•
•
•
•
In my code, the parent process does not need to wait these children processes. And I need to know which child process finishes first to do rest of the code.
In the parent process u already have the child process id's.
U can repeatedly use the 'ps' command to ckeck which processes are running. Whenever u get one process missing break the loop and continue. And now u have the process id which just finished.
I dont know how to check the status of the processes in other way (there must be some).
u can do
system("ps>processes");
//this will store the output to the file 'processes'
//parse from the file whatever u need.
Hope thats of some help
![]() |
Similar Threads
- Problem using multiple forks (C)
- fork and exit system calls (C)
- Help with pipes (parents reading arrays the child sends through them) (C++)
- Laser game --Need help to finish (C++)
- A function which will transfer the data from a file to STL( vector or map) object. (C++)
- waitpid w/ multiple processes (C)
- Delete related record (VB.NET)
- Making a UNIX Shell, so inexperienced at it (C++)
- How to list the record orderby id when selecting distinct (Visual Basic 4 / 5 / 6)
Other Threads in the C Forum
- Previous Thread: linux socket programming
- Next Thread: Random Access
| Thread Tools | Search this Thread |
adobe api array arrays binarysearch calculate char cm convert copyanyfile copypdffile cprogramme createcopyoffile createprocess() csyntax directory dynamic feet fflush file floatingpointvalidation fork forloop frequency getlasterror givemetehcodez global graphics gtkgcurlcompiling hacking hardware highest homework i/o inches incrementoperators intmain() iso kernel kilometer km linked linkedlist linux linuxsegmentationfault list locate logical_drives loopinsideloop. match matrix microsoft motherboard mqqueue mysql oddnumber odf open opendocumentformat opensource openwebfoundation owf pattern pdf performance pointer posix power probleminc program programming pyramidusingturboccodes read recursion recv recvblocked repetition research scanf scheduling segmentationfault send shape socketprograming socketprogramming stack standard strchr string suggestions systemcall test unix urboc user variable voidmain() wab win32api windows.h





