Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Close script with open system call

by kennethk (Abbot)
on Feb 27, 2020 at 13:10 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11113487]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (7)
As of 2024-04-25 11:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found