Here's a ps list after a client has connected:
7314 pts/1 S 0:00 /usr/bin/perl -w ./testserver 7315 pts/1 S 0:00 sh -c ogg123 -q -d raw -f - http://cal.icec +ast.net:8630/prog1.ogg | lame --silent -b 320 -r - 7316 pts/1 S 0:00 ogg123 -q -d raw -f - http://cal.icecast.ne +t:8630/prog1.ogg 7317 pts/1 S 0:00 lame --silent -b 320 -r -x - - 7318 pts/1 S 0:00 ogg123 -q -d raw -f - http://cal.icecast.ne +t:8630/prog1.ogg 7319 pts/1 S 0:00 ogg123 -q -d raw -f - http://cal.icecast.ne +t:8630/prog1.ogg 7321 pts/1 S 0:00 ogg123 -q -d raw -f - http://cal.icecast.ne +t:8630/prog1.ogg
After the client disconnects, the server does kill 1, $pid on the pid returned from open2. The ps list now looks like this:
7314 pts/1 S 0:00 /usr/bin/perl -w ./testserver 7315 pts/1 Z 0:00 [sh] <defunct> 7316 pts/1 S 0:00 ogg123 -q -d raw -f - http://cal.icecast.ne +t:8630/prog1.ogg 7318 pts/1 S 0:00 ogg123 -q -d raw -f - http://cal.icecast.ne +t:8630/prog1.ogg 7319 pts/1 S 0:00 ogg123 -q -d raw -f - http://cal.icecast.ne +t:8630/prog1.ogg 7321 pts/1 S 0:00 ogg123 -q -d raw -f - http://cal.icecast.ne +t:8630/prog1.ogg
You see that lame (my app2) is gone, and the shell is zombied. But all the ogg123 (app1) processes are still alive (and, according to the activity lights on the switch, still sucking data from the URL).
Am I going mad?
In reply to Re: Re: Taming multiple external processes
by 87C751
in thread Taming multiple external processes
by 87C751
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |