in reply to Running an external GUI program
Mac OSX conforms sufficiently to Unix for the purposes of this module, although the module documentation doesn't appear to give a list of supported environments.use Unix::PID; my $ps = new Unix::PID -> new(); # wait for completion of GUI's subprocess $ps -> wait_for_pidsof("name of program spawned by GUI"); # kill the GUI process $ps -> kill( $ps -> get_pidof("name of GUI program") );
Update: in a multi-user environment parents and children would have to be user-id'd and matched up before doing the wait then kill.
-M
Free your mind
|
|---|