Phweda has asked for the wisdom of the Perl Monks concerning the following question:
Script ends when it opens its logfile by a call to 'system'. Even with explicit 'exit' the script keeps running. Assume it is waiting for the system call to terminate? In this case want to force the script to terminate.
Script stays open until text application is closed or until a ctrl-c Thanks Phwedamy $logFileName = $rootDIR . "/fmlog.txt"; open $OUTPUTFILE, "> $logFileName" or die "Died trying to open the out +put file $!"; # Processing files and logging results close ($OUTPUTFILE); # Open Log file for user system($logFileName); exit;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Close script with open system call
by kennethk (Abbot) on Feb 27, 2020 at 13:10 UTC | |
by Phweda (Initiate) on Feb 27, 2020 at 14:37 UTC | |
Re: Close script with open system call
by Eily (Monsignor) on Feb 27, 2020 at 13:39 UTC | |
Re: Close script with open system call
by 1nickt (Canon) on Feb 27, 2020 at 12:30 UTC | |
Re: Close script with open system call
by ForgotPasswordAgain (Vicar) on Feb 27, 2020 at 13:36 UTC | |
by bliako (Abbot) on Feb 27, 2020 at 23:02 UTC | |
Re: Close script with open system call
by NERDVANA (Priest) on Feb 27, 2020 at 19:42 UTC |