#!/usr/bin/perl

# Copyright 2004, Paul Johnson (pjcj@cpan.org)

# This software is free.  It is licensed under the same terms as Perl itself.

# The latest version of this software should be available from my homepage:
# http://www.pjcj.net

# __COVER__ skip_test $^O eq "MSWin32"
# __COVER__ skip_reason Fork unreliable

$x = 1;

die unless defined ($pid = fork);

if ($pid)
{
    $x = 2;
}
else
{
    $x = 3;
}

print "$x: $$\n";
