inotifyd problems
Denys Vlasenko
vda.linux at googlemail.com
Fri Nov 14 22:10:03 UTC 2008
On Friday 14 November 2008 23:04, Vladimir Dronnikov wrote:
> > You must dispose of your own zombies, or set SIGCHLD to SIG_IGN.
> > the second is a semi-official Linux extension
>
>
> I'm concerned primarily to Linux.
>
>
> > Setting SIGCHLD to SIG_IGN would make inotifyd to fire-and-forget
> > the agent...
>
>
> ... but is incompatible.
>
>
> > Setting SIGCHLD to SIG_DFL will serialize events...
>
>
> ... but may lead to blocks.
?! Just install a SIGCHLD handler which does
"while(wait_any_nohang(NULL) > 0) conitnue;"
and children will be reaped as soon as they die.
This will be compatible.
However we use SIG_IGN in other applets as well, so it's ok
to use simpler method.
> > For now I am making inotifyd wait for children:
> > but I think we maybe need a run-time inotify option
> > to select which one do we want.
> >
> > Your opinion guys?
>
>
> I'd suggest to run wait_any_nohang() cycle upon event arrival and do not use
> wait(spawn()).
This will keep last zombie unreaped potentially for hours.
--
vda
More information about the busybox
mailing list