Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use POSIX::_exit(0) for the event loop tests when they're
run in ActiveState Perl.  POE::Wheel::Run (perhaps the forking)
crashes Perl when the wheel_run.t test is run with Tk's event
loop.  Using POSIX's _exit() seems to avoid the problem.
  • Loading branch information
rcaputo committed Jun 16, 2006
1 parent a270382 commit e557e4f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 5 additions & 5 deletions mylib/gen-tests.perl
Expand Up @@ -23,7 +23,6 @@
"# \$Id\$\n" .
"\n" .
"use strict;\n" .
"use POSIX qw(_exit);\n" .
"use lib qw(--base_lib--);\n" .
"use Test::More;\n" .
"\n" .
Expand Down Expand Up @@ -88,7 +87,7 @@
"BEGIN {\n" .
" \$| = 1;\n" .
" print qq(1..0 # Skip This test cannot be run on $^O\\n);\n" .
" POSIX::_exit(0);\n" .
" CORE::exit(0);\n" .
"}\n"
);
}
Expand All @@ -112,7 +111,7 @@
" \$| = 1;\n" .
" print qq(1..0 # " .
"Skip $module needs a DISPLAY (set one today, okay?)\\n);\n" .
" POSIX::_exit(0);\n" .
" CORE::exit(0);\n" .
" }\n" .
"}\n"
);
Expand All @@ -130,7 +129,7 @@
" if (\$@) {\n" .
" \$| = 1;\n" .
" print qq(1..0 # Skip $module could not be loaded\\n);\n" .
" POSIX::_exit(0);\n" .
" CORE::exit(0);\n" .
" }\n" .
"}\n"
);
Expand All @@ -142,15 +141,16 @@
"# \$Id\$\n" .
"\n" .
"use strict;\n" .
"use POSIX qw(_exit);\n" .
"--no_sys--" .
"use lib qw(--base_lib--);\n" .
"use Test::More;\n" .
"use POSIX qw(_exit);\n" .
"--display--" .
"--module--" .
"\n" .
"require '--base_file--';\n" .
"\n" .
"_exit 0 if \$^O eq 'MSWin32';\n" .
"CORE::exit 0;\n"
);

Expand Down
1 change: 0 additions & 1 deletion tests/30_loops/00_base/wheel_run.pm
Expand Up @@ -361,7 +361,6 @@ POE::Kernel->run();

### Post-run tests.


SKIP: {
skip "ptys not available", 2 unless POE::Wheel::Run::PTY_AVAILABLE;
skip "The underlying event loop has trouble with ptys on $^O", 2
Expand Down

0 comments on commit e557e4f

Please sign in to comment.