Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: open3 generates Windows Command Processor Has Stopped Working

by Anonymous Monk
on Nov 13, 2014 at 00:13 UTC ( [id://1107035]=note: print w/replies, xml ) Need Help??


in reply to open3 generates Windows Command Processor Has Stopped Working

Does any one know why I would get this failed Windows Command Processor error on an exit 0?

I dont, the MSDN might :)

Also, it might be related to open3, you might have better luck with Capture::Tiny if its applicable to your application

And not that I want to hide the problem, but the scheduler will automatically retry, so is there anyway I could avoid this pop-up on the failure because otherwise it hangs until I click on it?

Yup, Win32API::File::SetErrorMode( 2);

  • Comment on Re: open3 generates Windows Command Processor Has Stopped Working

Replies are listed 'Best First'.
Re^2: open3 generates Windows Command Processor Has Stopped Working
by DanEllison (Scribe) on Nov 13, 2014 at 23:23 UTC

    I've posted on MSDN and answers.microsoft but I'm getting the run around.

    I'm now running with SetErrorMode, but I'm still getting the pop-ups. I assume because it isn't really the perl job thats failing, but that the child perl job that is executed by open3 is getting wrapped in a cmd.exe. Although I don't get an error from the application, there are errors in the event viewer:

    Faulting application name: cmd.exe, version: 6.3.9600.16384, time stam +p: 0x5215e1f2 Faulting module name: dlnashext.dll_unloaded, version: 12.0.9600.16384 +, time stamp: 0x5215eb81 Exception code: 0xc0000005 Fault offset: 0x0000000000011882 Faulting process id: 0x1a5c8 Faulting application start time: 0x01cfff94a6b53f60 Faulting application path: C:\Windows\system32\cmd.exe Faulting module path: dlnashext.dll Report Id: e56a707d-6b87-11e4-826d-48d22452e95d Faulting package full name: Faulting package-relative application ID:

    I'm wondering now if the cmd.exe is being called because I'm simply trying to execute "stats.pl" and it needs to determine what executable can run that file type. Or will open3 always run the child in cmd.exe even if I change the command to "perl %STOCKS%/bin/stats.pl"?

      I suggest that you look at this and read it carefully. (All the way the end!)

      The problem is nothing to do with Perl.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

        Read it all the way to the bottom. Don't know what that had to do with anything.

      Try using 32775 which is maximum bittage according to docs of Win32API::File
      perl -MWin32API::File - die Win32API::File::SEM_FAILCRITICALERRORS() |Win32API::File::SEM_NOALIGNMENTFAULTEXCEPT() |Win32API::File::SEM_NOGPFAULTERRORBOX() |Win32API::File::SEM_NOOPENFILEERRORBOX() __END__ 32775 at - line 1.
Re^2: open3 generates Windows Command Processor Has Stopped Working
by DanEllison (Scribe) on Nov 15, 2014 at 04:45 UTC

    I have the .pl extension registered, and the command I was trying to execute via open3 was simply "stats.pl". Even though Windows was searching the path and finding it successfully, File::which will not find it, so I had to write my own variation. I first fully qualified the program name, and then determining that it was a perl script, I preceded it with an explicit call to perl. Then open3 did not need to run it in the command processor and I was able to make a full run without failures.

    I'll continue to complain in the windows forums about the command processor failures.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1107035]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-25 17:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found