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

Konstantin Osipov kostja.osipov at gmail.com
Sat Nov 30 07:14:05 MSK 2019


* Cyrill Gorcunov <gorcunov at gmail.com> [19/11/30 07:03]:
> Once we sart using non-blocking IO the read() could return -EAGAIN.
> I think I need to find out how python is handling this situation,
> is their read is blocking or not.

Take a look at how coio works. It adds the descriptor to the event
loop and yields the current fiber.

> 
> The eio reaps children itself, ie calls for wait. Thus imagine a situation,
> we start killing the process like
> 
> popen_kill(handle)
> 	...
> 	kill(handle->pid)
> 	...
> 
> but before we reach kill() this process exited by self or killed
> by a user on the node. The signal handler sets pid = -1 and we
> call kill(-1). Which is wrong of course.

Can't you check the pid > 0 before you send the signal?

-- 
Konstantin Osipov, Moscow, Russia


More information about the Tarantool-patches mailing list