in reply to Perl hangs when leaving the program

Guess what? No one here writed^Hwrote it either, and without a sample of the code in question all you're going to get is vague guesses as to what the problem is. Perhaps it's using a module which has a buggy destructor. Perhaps it's trying to surreptitiously upload the entire contents of your drive to flickr. Nobody here knows or could know (the troubles you've seen . . . erhm, sorry). Cut it down to the simplest possible code that exhibits the problem, or at the least give a more detailed outline of what it's doing (modules it's using, descriptions of how it's using them) than the vague one you've given above.

Now having said that, you might try running (OS allowing) something like strace or ktrace and see what system calls it's making under the hood; that may give you a window into what the underlying OS actions it's doing are and point to where the problem lies. But that's just a vague guess.

  • Comment on Re: Perl hangs when leaving the program

Replies are listed 'Best First'.
Re^2: Perl hangs when leaving the program
by kurre_vaxholm (Acolyte) on May 10, 2007 at 08:41 UTC
    Hi there, sorry for the "fuzzy" question, but I have never seen Perl behave like that, meaning going bezerk when leaving the perl interpretor.
    Thanks for the tip concerning buggy destructor's etc... now I at least can start to have a look where it goes wrong. The reason why I did not post any code is that the program is build up of 10 modules a different vendor wrote, approx 5000 lines of code with global vars, dozens of hash pointers, and since it crashes, leaveing the perl interpretor, well it is hard to find the snippet of code that makes perl hang.
    Now at least I have somthing to work with, but it also seems to be a bug in the perl interpretor, it shall not hang/infinite loop, when doing garbage collection.
    Kurre