If I do
Process.fork do
x
end
how can I know what x returned (e.g. true/fase/string) ?
(Writing to a file/database is not an
According to the documentation:
If a block is specified, that block is run in the subprocess, and the subprocess terminates with a status of zero.
So if you call it with a block, it returns 0. Otherwise, it functions basically the same as the fork()
system call on Unix (the parent receives the PID of the new process, the child receives nil
).