in reply to Re^2: Handling badly behaved system calls in threads
in thread Handling badly behaved system calls in threads
You're implying that if you use fork (i.e. create child processes), the workers won't be in the same process group. That's not true. A process group is a group of processes, not a group of threads. (Mind you, all your threads will be in the same process group by virtue of being in the same process.)
if (!fork()) { sleep; exit(0); } if (!fork()) { sleep; exit(0); } kill TERM => $$; # Only kills self
if (!fork()) { sleep; exit(0); } if (!fork()) { sleep; exit(0); } kill -TERM => $$; # Kills all three processes
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Handling badly behaved system calls in threads
by kennethk (Abbot) on Sep 07, 2010 at 15:56 UTC |