RosettaCodeData/Task/Fork/ALGOL-68/fork.alg

12 lines
191 B
Plaintext

main:
(
INT pid;
IF (pid:=fork)=0 THEN
print("This is new process")
ELIF pid>0 THEN
print("This is the original process")
ELSE
print("ERROR: Something went wrong")
FI
)