Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

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)

Comment on cygwin repeat execute the crushed program
Download Code
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2014-12-19 04:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (70 votes), past polls