handsomedylan has asked for the wisdom of the Perl Monks concerning the following question:

i am using perl to write a test program ,to find out which kind of input will crush the system.the problem is when the system crushed,it doesn't exit,it still execute the "TEST_EVOICE.exe" for another 5 times ,then it exit;i don't know why, i am using cygwin for that ,and when i am using the cmd,it seems to be ok,but there will be annoying messagebox; how can i set the cygwin to run only one time when the program i call has been crushed ? please help me

my @args=($TEST_EVOICE,$MODE,$file,$result_file,$resultfile_size); say "@args"; eval{$nResult=system(@args)}; $nResult=system(@args)

Replies are listed 'Best First'.
Re: cygwin repeat execute the crushed program
by Corion (Patriarch) on Sep 26, 2011 at 09:11 UTC

    Also, to suppress the error message box, see SetErrorMode, which is for example exported from Win32API::File.

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: cygwin repeat execute the crushed program
by moritz (Cardinal) on Sep 26, 2011 at 09:07 UTC
      actually that's exactly what i 've done in my perl script,but i do not put the system() in the loop,the system command itself execute 6 times,so that's why i am confused, i tried to type the command in the cygwin directly ,it also execute for 6 times, so i guess it's not the problem of the perl or system(),but the cygwin itself,kinds of self protection.