Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

win32+fork "Application Error", bug?

by bsb (Priest)
on Jan 10, 2007 at 05:25 UTC ( [id://593830]=perlquestion: print w/replies, xml ) Need Help??

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

While trying to debug another program on Windows XP I was overwhelmed by the errors from the following program. I had to ctrl+alt+delete to end process then click away another 10 or so error dialogs.
perl -e "fork or warn 1 while 1; die 2"

The popup error is:

perl.exe - Application error

The instruction at "0x..." referenced memory at "0x00000004". The memory could not be "written".

Click on OK to terminate the program
Click on CANCEL to debug the program

This is AS perl 5.8.8, build 817, replicated on another machine. Do others get this behaviour? Does blead?

Brad

Replies are listed 'Best First'.
Re: win32+fork "Application Error", bug?
by jettero (Monsignor) on Jan 10, 2007 at 11:53 UTC

    I don't think a fork while 1 style application should er... not cause a memory error. You've instructed your computer to fork as fast as it can, apparently before it can get to the die 2. It consumes all your memory and that'd be why you have to hit the three finger salute.

    -Paul

      Indeed.

      This kind of junk is commonly called a "fork bomb". I don't think it's even reasonable to expect that this will behave nicely.

      fork or die while 1;
      might behave just a little bit better.
Re: win32+fork "Application Error", bug?
by Anonymous Monk on Jan 10, 2007 at 05:38 UTC
    Works on perl v5.8.7, ActivePerl Build 813

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-19 04:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found