http://qs321.pair.com?node_id=11113487


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.