Re: [mt-daapd-devel] mt-daapd 0.2.4 stable Not Responding to INT or HUP Signals Sent from Daemontoo
Status: Beta
Brought to you by:
andrew40
From: Ron P. <ro...@pe...> - 2006-06-18 03:49:27
|
> 1) Why is mt-daapd not responding to the INT and HUP signals sent > from svc? I do not know. It sounds like a pthreads issue though. The signal strategy used is to block all signals on all threads except for a signal handling thread. That thread runs with signals set to SIG_IGN and sits in a sigwait loop to be notified of signals. I had understood that to be "best practice" in handling signals in multi-threaded applications, but apparently not all pthreads libraries deliver signals to the unblocked thread. I believe that to be a pthread impelmentation bug. > 2) Why was INT chosen as the shutdown signal rather than TERM? Just because I was looking to cleanly shutdown on a ctrl-c when running in the foreground, and I hadn't bothered to add sigterm handling until recently. It does handle sigterm in current nightlies. -- Ron |