Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
14
Task/Fork/BaCon/fork.bacon
Normal file
14
Task/Fork/BaCon/fork.bacon
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
' Fork
|
||||
pid = FORK
|
||||
IF pid = 0 THEN
|
||||
PRINT "I am the child, my PID is:", MYPID
|
||||
ENDFORK
|
||||
ELIF pid > 0 THEN
|
||||
PRINT "I am the parent, pid of child:", pid
|
||||
REPEAT
|
||||
PRINT "Waiting for child to exit"
|
||||
SLEEP 50
|
||||
UNTIL REAP(pid)
|
||||
ELSE
|
||||
PRINT "Error in fork"
|
||||
ENDIF
|
||||
Loading…
Add table
Add a link
Reference in a new issue