On Wed, Feb 1, 2017 at 2:11 AM,  <[email protected]> wrote:
> Hi.
>
> I need to create multiple processes all listening on the same port
> (SO_REUSEADDR) and sharing the same loop handler.
> I can run this easily with libev:
>
>     while (--wrk) {
>         pid_t pid = fork();
>         if (pid == 0) {
>             ev::default_loop().post_fork();
>             ev::default_loop().run();
>             return true;
>         }
>     }
>     ev::default_loop().run();
>     return true;
>
> However, I can't find an easy way to do the same with libuv :(.
> Seems it provides just "uv_spawn"... But I don't need to run any executable
> and pass arguments.
> I just need to share same loop handler between clones of the same process...

The short answer is: you can't do that.  Libuv currently doesn't
support the fork model but see
https://github.com/libuv/libuv/pull/846.

-- 
You received this message because you are subscribed to the Google Groups 
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/d/optout.

Reply via email to