Fork: Difference between revisions

Content deleted Content added
Sonia (talk | contribs)
m →‎{{header|Go}}: library change, also mentioned alternative package.
Line 166: Line 166:


[ "Hello form child" print flush 0 _exit ] [ drop "Hi from parent" print flush ] with-fork</lang>
[ "Hello form child" print flush 0 _exit ] [ drop "Hi from parent" print flush ] with-fork</lang>
=={{header|Fexl}}==


=={{header|Go}}==
=={{header|Go}}==
This program prints its own pid, then runs a copy of itself if given any argument on the command line. When it does so, it prints the pid of the child process it started. Output should show this pid matching the child's self reported pid. See also package os/exec which offers a higher level interface and may be simpler in some situations. For the purpose of this task though, there is little difference.
This program prints its own pid, then runs a copy of itself if given any argument on the command line. When it does so, it prints the pid of the child process it started. Output should show this pid matching the child's self reported pid. See also package os/exec which offers a higher level interface and may be simpler in some situations. For the purpose of this task though, there is little difference.