1. I have a script that envokes a second Perl/Tk script to get some input from the user. The second is standalone because it's general purpose and I didn't want to rewrite it every place I want to use it. Anyhoo, I'm running this second script through a system call:
system("perl path_to_other_script");
If a user decides to exit while in that second script (which is a child process in my mind), how can I tell the parent to exit as well? And can I tell the difference between a user-selected exit versus the script running its course successfully?
2. In each of my Perl/Tk scripts I include a button or a menu option that issues an 'exit' so I can force whatever the script is doing to stop. Works great as long as a user doesn't hit the 'x' in the upper right hand corner of the window. Is there a way to catch that 'x' signal? I've tried creating signal handlers for INT, ABRT, KILL, STOP, and QUIT, but none of them seem to apply.
Any help would be GREATLY appreciated!!
In reply to Handling child process and close window exits in Perl/Tk by meliason
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |