New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No equivalent of POSIX::_exit() for MSWin32 pseudo-processes? #10295
Comments
From @apocalypseCreated by apocal@cpan.orgHello, I am filing this perlbug after some experimentation and talking with The problem is that I am doing fork under MSWin32 and wanted to exit At first I was clueless on how to simulate the same POSIX behavior After talking with Jan again, we agreed that this definitely should * Running the testcase via "perl test.pl 1 0" will result in the * Running the testcase via "perl test.pl 1 1" will result in the * Looking at the testcase, I had to add the "next if $$ < 0" code * If you comment out the "next if $$ < 0" line and run ( "perl * Playing around with the testcase I got more and more confused. Why * Running the testcase on my Ubuntu linux system, CORE::kill worked At this point I'm just handing the baton over to the p5p wizards. I My system info: Windows XP Professional 32bit SP3 Here's the testcase: END { for ( 0 .. ($ARGV[0] - 1) ) { if ( defined $ARGV[1] ) { Perl Info
|
From @jkeenanThis ticket has received no response in nearly seven years. To facilitate discussion, I am attaching the test program supplied by the original poster. I am also attaching the STDERR output I got from running the test program on perl-5.24.1 on Linux. Could we get the test program run on an up-to-date perl on Windows? Thank you very much. -- |
From @jkeenan#!/usr/bin/perl
use strict;
use warnings;
END {
warn "THIS SHOULD BE PRINTED ONCE!";
}
for ( 0 .. ($ARGV[0] - 1) ) {
next if $$ < 0; # needed to stop loop in child ( a bug? )
warn "Loop $_";
my $pid = fork;
unless ( $pid ) {
warn "Hello from child ($$)";
if ( defined $ARGV[1] ) {
if ( $ARGV[1] ) {
warn "kill: " . CORE::kill( KILL => $$ );
} else {
die;
}
} else {
# do nothing?
}
} else {
warn "Hello from parent ($$)";
wait;
}
}
|
From @jkeenanLoop 0 at 74196-fork.pl line 11. |
The RT System itself - Status changed from 'new' to 'open' |
Migrated from rt.perl.org#74196 (status was 'open')
Searchable as RT74196$
The text was updated successfully, but these errors were encountered: