So I understand that Windows does not support the Unix fork-exec model and instead spawns processes. However, Strawberry Perl's fork emulation produces children with negative PIDs. These PIDs appear to be consistent, but I don't understand why they are negative or, really, how Perl is emulating Unix fork.
use strict;
use warnings;
my $cpid = fork();
if ($cpid == 0) {
printf "%s\n", "I'm the child, pid is $$";
} else {
printf "%s\n", "I'm the parent, pid is $$, cpid is $cpid";
}
This produces something similar to:
I'm the parent, pid is 3428, cpid is -2600
I'm the child, pid is -2600