Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Close script with open system call

by kennethk (Abbot)
on Feb 27, 2020 at 13:10 UTC ( #11113487=note: print w/replies, xml ) Need Help??


in reply to Close script with open system call

As documented in system:
Does exactly the same thing as exec, except that a fork is done first and the parent process waits for the child process to exit.
So, if you don't want to wait for the child process to exit (e.g., someone to close the text editor), change that to an exec. It will change the executing process -- mind body and soul -- to be the running text editor, giving up control forever.

You also can remove the exit in that case, too. Please note that exit is almost never what you actually mean to do if you don't need to return a status code. Just let the script roll off the end.


#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

Replies are listed 'Best First'.
Re^2: Close script with open system call
by Phweda (Initiate) on Feb 27, 2020 at 14:37 UTC

    Thanks all exec was what I needed.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2020-05-30 06:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (171 votes). Check out past polls.

    Notices?