Re: udev can fail to read stdout of processes spwaned in udev_event_spawn

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx> 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
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux