Fork: Difference between revisions

529 bytes added ,  7 years ago
m (→‎{{header|Perl 6}}: not 'Int', but native type 'int')
Line 983:
<pre>I am the proud parent of 17691.
I am a child. Have you seen my mommy?</pre>
 
=={{header|Phix}}==
Phix has create_thread which creates a separate thread, with its own call stack, but sharing common data (like most fork examples here).<br>
To run something completely independently, use system() or system_exec(), depending on whether you want a shell and/or to wait for a result.
<lang Phix>procedure mythread()
?"mythread"
exit_thread(0)
end procedure
 
atom hThread = create_thread(routine_id("mythread"),{})
?"main carries on"
wait_thread(hThread)</lang>
or
<lang Phix>system("calc")</lang>
 
=={{header|PHP}}==
7,796

edits