lamberms has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks,
I am currently running ActiveState Perl 5.6.1 (635) and the pdk. I have a application that is being used on many machines. The application launches several Perl programs using Win32::Process. On two of the machines I run on, whenever exit() is called, the script hangs and locks up the Command Window. Just running these programs from the command line seems to work but when I call them with Win32::Process and they call exit() they hang with the Command Windows open. Help please.
Best Regards,
Mike
Re: Perl Scripts Hang On exit() Being Called
by tachyon (Chancellor) on Mar 07, 2004 at 15:07 UTC
|
Although it may not be related we had some issues with Perl scripts 'hanging' on exit where we had built really big hashes (GB size). They did *eventually* exit after about 10 minutes! but they were caught up with a malloc bug in an extended hash cleanup. Using POSIX::_exit fixed the issue for us, perhaps it will work for you. Easy to try anyway and it is supported on Win32....
use POSIX qw[ _exit ];
...
# avoid perl exit which hangs in some circumstances
POSIX::_exit(0);
| [reply] [d/l] |
|
tachyon,
That does not seem to work. This problem always happens on certain machines every time. It is really weird. One machine is a P4 running XP Pro and the other is a Dual Xeon which has had Win2k installed and XP Pro installed (did not make a difference).
Best Regards,
Mike
| [reply] |
Re: Perl Scripts Hang On exit() Being Called
by DaWolf (Curate) on Mar 07, 2004 at 19:45 UTC
|
| [reply] |
Re: Perl Scripts Hang On exit() Being Called
by hossman (Prior) on Mar 08, 2004 at 02:44 UTC
|
#!perl
exit;
...if it still hangs on some computers, burn them.
| [reply] [d/l] |
|