Getting SIGHUP in a DO process launched by NSTask
Getting SIGHUP in a DO process launched by NSTask
- Subject: Getting SIGHUP in a DO process launched by NSTask
- From: "Peter Sichel" <email@hidden>
- Date: Sat, 8 Sep 2007 15:42:44 -0400
I recently re-factored IPNetRouterX to run its DHCP Server as a separate
process or daemon launched using NSTask as follows:
[NSTask launchedTaskWithLaunchPath:path arguments:args];
Which it then controls using Distributed Objects (eventually I'd like to
use launchd).
The DHCP Server process sets up a signal handler for SIGHUP which causes
it to reload its configuration file (per UNIX convention), but for some
reason it is not receiving SIGHUP [the same code works correctly for SIGUSR1].
I'm testing from a terminal using:
kill -HUP <pid>
Checking Stevens APUE it says SIGHUP is sent to the "Session Leader" but
I'm not sure how this translates to an NSRunLoop or what else might
prevent SIGHUP from being delivered.
Any ideas?
- Peter
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden