Task

Spawn a new process which can run simultaneously with, and independently of, the original parent process.




 
    var pid = fork()
    switch (pid) {
    case <0:
        println ("fork error")
        break
    case 0:
        println ("child")
        break
    default:
        println ("parent")
        break
    }
 