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


in reply to Re^3: Determine if a program in a different terminal has ended
in thread Determine if a program in a different terminal has ended

For demonstration, try this... I'm having trouble explaining my situation hehehehe
# myscript.pl # # script must be run in a terminal # use Gtk2 '-init'; my $window = Gtk2::Window->new(); $window->signal_connect( destroy => sub { exit } ); my $button = Gtk2::Button->new("click me to close"); $button->signal_connect('clicked'=> sub { exit } ); $window->add($button); $window->show_all(); Gtk2->main;

next is the main code
# main.pl # my $k = 0; while($k < 3){ system("gnome-terminal -e 'perl myscript.pl'"); $k++; }

if i ran main.pl it call the script 3x then ends... yet the first myscript.pl has not yet finished running... it waits for you to press the button... what i wanted to do is... open the 1st myscript.pl then wait for somebody to press it... then if somebody presses it, another myscript.pl would run again.. then so on..
Mabuhay Civil Engineers! :D