-
Notifications
You must be signed in to change notification settings - Fork 653
abort() when uv_signal_start() after fork() #1405
Comments
There is some global state associated with signal handling, so I wouldn't do that. We don't currently have a good story for forking scenarios, I'm afraid. |
Opps, and let me know: such a "global state" (which I assume is the static Unix sockets for firing signal events to each loop) is created upon initiation of the first UV loop, right? |
So no imminent fix, right? |
Nope, I'm afraid. |
Afraid of what? |
It's not happening any time soon, I mean. |
Could we possibly have a |
Ideally it would be nice to make it automagic. Maybe we can use I don't think we can support all cases, so I'd say that creating an eventloop in the parent and then trying to use in the child would be unsupported. This should make things easier, though I haven't really sat down to think this all the way through. You are welcome to work on this and come up with a design which we can discuss :-) |
2014-08-10 21:28 GMT+02:00 Saúl Ibarra Corretgé [email protected]:
BTW my use-case was not su hard:
I was never trying to reuse the same loop. Iñaki Baz Castillo |
@ibc yeah, your use case would be supported. But we would need to reinitialize some stuff like the signal handlers thing and probably something in the threadpool as well. |
libuv master. This crash happens in OSX (in Linux it gets frozen). My code does the following:
fork()
to become a daemon.uv_signal_start()
.It crashes as shown below. It works perfectly if I don't fork.
lldb output in OSX:
The UV code calling
abort()
is in src/unix/signal.c line 106:So
uv__signal_lock()
returns != 0:Can not I run (and close) a UV loop before forking and then run other after forking??
The text was updated successfully, but these errors were encountered: