Skip to content

Instantly share code, notes, and snippets.

@anj1
Created July 12, 2014 04:53
Show Gist options
  • Save anj1/c71ab2897a41da02b152 to your computer and use it in GitHub Desktop.
Save anj1/c71ab2897a41da02b152 to your computer and use it in GitHub Desktop.
function forkjulia()
r = ccall((:fork, "libc"), Int32, ())
if r != 0
# parent
returnstatus=0
ccall((:waitpid, "libc"), Int32, (Int32, Ptr{Int32}, Int32), r, &returnstatus, 0)
println("forkjulia: return status: $returnstatus")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment