diff options
Diffstat (limited to 'examples/fork.fy')
| -rw-r--r-- | examples/fork.fy | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/fork.fy b/examples/fork.fy new file mode 100644 index 0000000..c49c878 --- /dev/null +++ b/examples/fork.fy @@ -0,0 +1,14 @@ +#* + * Examples of how to use fork + *# + +my pid = fork; + +if pid { + put "I am the parent process and the child has the pid "; + say pid; +} + +ifnot pid { + say "I am the child process"; +} |
