• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Getting SIGHUP in a DO process launched by NSTask
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Getting SIGHUP in a DO process launched by NSTask
      • From: Quinn <email@hidden>
  • Prev by Date: Re: Socket timeout issue
  • Next by Date: Best practices for interpreting network reachability flags?
  • Previous by thread: Re: How to find realm of an Authentication Challenge
  • Next by thread: Re: Getting SIGHUP in a DO process launched by NSTask
  • Index(es):
    • Date
    • Thread