Commit | Line | Data |
60ffb308 |
1 | #!/usr/bin/perl -w |
ccbd73a4 |
2 | # $Id: /mirror/googlecode/test-more/t/fork.t 57943 2008-08-18T02:09:22.275428Z brooklyn.kid51 $ |
60ffb308 |
3 | |
4 | BEGIN { |
5 | if( $ENV{PERL_CORE} ) { |
6 | chdir 't'; |
7 | @INC = '../lib'; |
8 | } |
9 | } |
10 | |
11 | use Test::More; |
12 | use Config; |
13 | |
5143c659 |
14 | my $Can_Fork = $Config{d_fork} || |
15 | (($^O eq 'MSWin32' || $^O eq 'NetWare') and |
16 | $Config{useithreads} and |
17 | $Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/ |
18 | ); |
19 | |
20 | if( !$Can_Fork ) { |
60ffb308 |
21 | plan skip_all => "This system cannot fork"; |
22 | } |
23 | else { |
24 | plan tests => 1; |
25 | } |
26 | |
27 | if( fork ) { # parent |
28 | pass("Only the parent should process the ending, not the child"); |
29 | } |
30 | else { |
31 | exit; # child |
32 | } |
5143c659 |
33 | |