![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| getting the return code of forked child process (ftp) | KittyJ | High Level Programming | 7 | 08-19-2007 12:44 AM |
| display in a child process a command called in the parent one | remid1985 | High Level Programming | 7 | 01-19-2007 02:40 PM |
| how to find the chid process id from given parent process id | guhas | Shell Programming and Scripting | 3 | 10-13-2005 05:13 AM |
| Implementing 2 pipes between a parent and child process | bwgoudey | High Level Programming | 2 | 09-24-2005 08:14 PM |
| parent and child process question? | tosa | High Level Programming | 0 | 02-16-2005 11:04 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
That's because windows uses a threaded model, mandatory locking and various other design practices that were regarded as too complex by most *nix OS designers in regards to userspace applications.
I'd submit, humbly, that in my experience with MS products they were not far wrong. |
| Forum Sponsor | ||
|
|
|
|||
|
But with a small change ..
If there is no particular reason that you are using fork() and exec() to create the child process, you could make your child.c a non-main function and, instead of exec()-ing it, call it as a function after the fork():
// in main if ( 0 == (pid = fork() )) child(int values_needed, ..., int *value_to_return); exit(...); else // parent code here. This WILL solve your problem without IPC or shared memory if you simply pass parameters to the child. Hope this helps. Stewartw |
|||
| Google UNIX.COM |