Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Perl System('') question

by pobocks (Chaplain)
on Nov 29, 2008 at 10:26 UTC ( [id://726759]=note: print w/replies, xml ) Need Help??


in reply to Re: Perl System('') question
in thread Perl System('') question

Hmmm... What does this do to a program that's still running when you "last" out of the loop? Like, say you're running a find, and want to kill the find as soon as it spots the thing it's looking for?
for(split(" ","tsuJ rehtonA lreP rekcaH")){print reverse . " "}print "\b.\n";

Replies are listed 'Best First'.
Re^3: Perl System('') question
by ikegami (Patriarch) on Nov 29, 2008 at 12:40 UTC
    close $eject; will wait for the child to end (after closing pipes to the child?) If you wish to save it from doing extra work, you could ask it to end by sending a TERM signal to it before calling close. The return value of open '-|' is the child's PID.

      ++ to both of you! I didn't think about that yet.


      s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
      +.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e
Re^3: Perl System('') question
by ikegami (Patriarch) on Nov 29, 2008 at 12:42 UTC
    close $eject; will wait for the child to end (after closing pipes to the child?) If you wish to save it from doing extra work, you could ask it to end by sending a TERM signal to it before calling close. The return value of open '-|' is the child's PID.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2024-04-18 14:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found