[systemd-devel] udev can fail to read stdout of processes spwaned in udev_event_spawn
Paul Davey
Paul.Davey at alliedtelesis.co.nz
Sun Nov 3 21:52:55 UTC 2019
On Fri, 2019-11-01 at 10:13 +0100, Michal Sekletar wrote:
> 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.
I shall add a function to drain the file descriptors and call it in the
sigchld callback. How should I submit a patch?
Thanks,
Paul
More information about the systemd-devel
mailing list