Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

cygwin repeat execute the crushed program

by handsomedylan (Initiate)
on Sep 26, 2011 at 08:19 UTC ( #927815=perlquestion: print w/replies, xml ) Need Help??
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 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.
Re: cygwin repeat execute the crushed program
by Corion (Pope) 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.

      3Q 4 ur advice,it works perfect on cmd now .....miaomiao

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://927815]
Approved by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2016-09-30 05:59 GMT
Find Nodes?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:

    Results (562 votes). Check out past polls.