![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Running multiple processes in Linux | abcabc1103 | UNIX for Dummies Questions & Answers | 6 | 03-24-2009 08:29 AM |
| removing pattern which is spread in multiple lines | sabyasm | Shell Programming and Scripting | 2 | 05-13-2008 05:19 AM |
| Spawning multiple threads in Unix | neeto | Shell Programming and Scripting | 5 | 04-17-2008 03:10 PM |
| Doubt about multiple processes | Legend986 | Shell Programming and Scripting | 9 | 10-29-2007 11:49 AM |
| Can I spread commands over multiple lines? | tphyahoo | UNIX for Dummies Questions & Answers | 1 | 06-07-2006 09:08 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
spawning multiple processes spread across two files
I want to spawn n child processes but have two different classes..with the foremost one forking/spawning the child process and the latter performing a function w/ the spawned processes.
I can do this in one class with an if statement and the simple if((pid=fork())==0) //child process { //do code } else { //do code as parent process. } In doing in w/ two different classes would I need to pass fork() to the slave class? I don't to fork my main process and have it execute the same code as the parent process I want it to execute its own code. That's why I want a separate child/slave class. also is there a way to JUST spawn children? I don't understand why fork() would create parent processes. Hopefully my problem isn't too convoluted, thanks. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|