tech-userlevel archive

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

Re: Library support for two-phase daemonization



On Thu, 30 Jan 2014, Andreas Gustafsson wrote:

> A couple of days ago, Iain Hibbert wrote:
> > btw I did this in btpand(8), which uses libevent (and thus kqueue)
>
> That's good, but I think it has a race condition: the SIGUSR1 can be
> delivered to the parent before it has called signal(SIGUSR1, main_exit).

hm.. I meant to add, that having a standard API for such as this would
make it easier to do without making mistakes :)

For some reason, I have an uncommitted change in my local source tree, to
use SIGTERM for this.. which would at least always cause an exit. (I don't
remember why I made that change, have not looked at it for a while as my
Android phone stinks at Bluetooth)

iain


Home | Main Index | Thread Index | Old Index