
February 20th, 2006, 10:27 AM
|
 |
Banned ;)
|
|
Join Date: Nov 2001
Location: Woodland Hills, Los Angeles County, California, USA
|
|
|
First, fork() doesn't create threads, it creates a copy of your current process. With that said, you can use pipe() (or popen()) to do process synchronization. The basic idea is that a process is blocked if it attempts to read() from the pipe handle and there is no input available to read. You can use this to synchronize between processes. Google for "IPC pipe" or "process synchronization popen" for examples.
__________________
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
|