Supervisor / supervisor

Supervisor process control system for Unix (supervisord)
http://supervisord.org
Other
8.34k stars 1.23k forks source link

process blocks when writing to redirected stdout #1554

Open foobar opened 1 year ago

foobar commented 1 year ago

If a process redirects stdout, supervisord creates a pipe and watchs for READ event on the pipe. If the readfd() fails due to some error(in my case it's OutOfMemory exception), the pipe will be removed from the poll list but the FD is not closed. This means the pipe has no reader and the process will block forever when writing something to stdout.

It seems supervisor could either ignore such errors and retry or just close the pipe to let the child get EPIPE on writing to stdout