renegadex has asked for the wisdom of the Perl Monks concerning the following question:
Hi! i have this code.
Run the myscript.pl in a new terminal (it needs to run in a terminal for it to work properly... it has photorec batch commands inside)
The script should run again after it has finished running.
My problem is that since the script was ran on another terminal... I think the system command instantly finished when after executing the command since the program was launched in a new terminal... just like running a separate thread.
So what happens is that it runs the same script all at the same time instead of waiting for the first 1 to finish. Any help would be appreciated. :D
Or maybe, is there a way to run a perl script in a terminal like environment without the terminal?
This is what I want to happen.my $k = 0; while($k < 3){ system("gnome-terminal -e 'perl myscript.pl'"); }
Run the myscript.pl in a new terminal (it needs to run in a terminal for it to work properly... it has photorec batch commands inside)
The script should run again after it has finished running.
My problem is that since the script was ran on another terminal... I think the system command instantly finished when after executing the command since the program was launched in a new terminal... just like running a separate thread.
So what happens is that it runs the same script all at the same time instead of waiting for the first 1 to finish. Any help would be appreciated. :D
Or maybe, is there a way to run a perl script in a terminal like environment without the terminal?
Mabuhay Civil Engineers! :D
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Determine if a program in a different terminal has ended
by almut (Canon) on Sep 17, 2009 at 11:15 UTC | |
by renegadex (Beadle) on Sep 17, 2009 at 11:41 UTC | |
by almut (Canon) on Sep 17, 2009 at 11:52 UTC | |
by renegadex (Beadle) on Sep 17, 2009 at 12:15 UTC | |
by almut (Canon) on Sep 17, 2009 at 12:40 UTC | |
| |
by renegadex (Beadle) on Sep 17, 2009 at 12:08 UTC |
Back to
Seekers of Perl Wisdom