Fork: Difference between revisions

Content added Content deleted
mNo edit summary
Line 615: Line 615:
};</lang>
};</lang>


=={{header|Perl 6}}==
{{works with|Rakudo Star|2013-01}}
<lang perl6>use NativeCall;
sub fork() returns Int is native { ... }

if fork() -> $pid {
print "I am the proud parent of $pid.\n";
}
else {
print "I am a child. Have you seen my mommy?\n";
}</lang>
{{out}}
<pre>I am the proud parent of 17691.
I am a child. Have you seen my mommy?</pre>
=={{header|PHP}}==
=={{header|PHP}}==
{{trans|C}}
{{trans|C}}