in reply to Re: Re: Killing of ALL children made by Open3
in thread Killing of ALL children made by Open3
I don't have any Windows machines to test on; it works on Linux.
One thing I noticed is that my arguments to open3 were wrong. This works better:
my_open3(\*STDIN,'>&STDOUT','>&STDOUT',"ping 10.0.0.1"); my_open3(\*STDIN,'>&STDOUT','>&STDOUT',"ping 10.0.0.100"); my_open3(\*STDIN,'>&STDOUT','>&STDOUT',"ping 10.0.0.2");
Another thing to think about is that CMD.EXE and PING could both be running at the same time, so killing the PID returned by open3 might just kill CMD.EXE and leave PING alone. You might be able to avoid running CMD.EXE by giving open3 ping and its arguments as a list instead of a string:
but I'm not sure.my_open3(\*STDIN,'>&STDOUT','>&STDOUT','ping', '10.0.0.2');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Killing of ALL children made by Open3
by Anonymous Monk on Nov 17, 2003 at 20:43 UTC |