Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: how to stop command

by sundialsvc4 (Abbot)
on Jul 23, 2018 at 14:20 UTC ( #1219104=note: print w/replies, xml ) Need Help??


in reply to Re: how to stop command
in thread how to stop command

So, if the system-command executor is interrupted by a signal, it will kill the system-command subprocess (not just abandon it to keep running), and leave the accumulated output intact?   Cool.   Is there any perldoc about this behavior, for either back-quote or qx//?

Replies are listed 'Best First'.
Re^3: how to stop command
by haukex (Chancellor) on Jul 23, 2018 at 18:00 UTC
    it will kill the system-command subprocess (not just abandon it to keep running), and leave the accumulated output intact? Cool.

    No, neither of those things are true, and I didn't claim they were. The OP is running ls, which should normally end on its own, even if it takes longer than 5 seconds to list the files (I'm guessing a slow network mount or similar). Which is also why I suggested IPC::Run - it supports getting partial output, plus a kill_kill method to make sure the child is killed, if either of those things are desired.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1219104]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2019-12-07 19:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (162 votes). Check out past polls.

    Notices?