[Tarantool-patches] [PATCH 1/5] popen: Introduce a backend engine

Cyrill Gorcunov gorcunov at gmail.com
Sat Nov 30 10:48:52 MSK 2019


On Sat, Nov 30, 2019 at 07:21:58AM +0300, Konstantin Osipov wrote:
> First of all, thanks for the explanation - now I understand the
> problem at least.
> 
> > 	pid = vfork();
> > 	if (pid == 0) {
> > 		_exit(1);
> > 
> > 		here sigchld already delivered to the libev
> > 		and it reaped it, vanishing from the system
> > 		so that anyother application can reuse it
> 
> No, this is not how it works. Yes, the signal itself *may* 
> be delivered asynchronously (*sometimes*), but the callback is called
> synchronously. In other words, when you do a vfork()
> and check the non-zero pid return value you're executing an
> existing libev callback. No other callback will get invoked until
> you finish with your callback.

You know, I think I need to read more libev source code first
to be able to comment. I'll back later. Kostya, thanks a huge
about all your participation, I really appreciate!


More information about the Tarantool-patches mailing list