$pid = open $pipe, "/some/program |"; while (<$pipe>) { ... # /some/program's output in $_ } close $pipe; # program gets a sigpipe if (kill 0, $pid) { # still there? kill 15, $pid; }
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
In reply to Re: start and kill a process in a local shell
by shmem
in thread start and kill a process in a local shell
by danmcb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |