[systemd-devel] udev can fail to read stdout of processes spwaned in udev_event_spawn

Michal Sekletar msekleta at redhat.com
Fri Nov 1 09:13:58 UTC 2019


On Fri, Nov 1, 2019 at 1:49 AM Paul Davey
<Paul.Davey at alliedtelesis.co.nz> wrote:

> What is the best way to fix this issue?  I have locally had success
> just calling the on_spawn_io callback in the process success branch of
> on_spawn_sigchld, but I am unsure if this is an acceptable fix.

In the callback, we call read() only once and I don't think we have
any guarantee that kernel will give us the entire output of the child
process in one go. I figure we should drain the file descriptor in a
loop.

Michal



More information about the systemd-devel mailing list