On Jul 2, 2016 2:32 AM, "Alex Bligh" <a...@alex.org.uk> wrote:
>
>
> On 2 Jul 2016, at 05:23, Matt Harden <matt.har...@gmail.com> wrote:
>
> > Forking is not safe in Go either.
>
> Why? Let's assume one knows what one is doing and doesn't try to use
channels etc.

In general you can't use fork in a multi-threaded program, because a
different thread might be holding, say, the malloc lock during the fork.
The result would be that the child process can not allocate any memory.
The only time fork is safe is when it is immediately followed by exec.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to