Revision: 23387 http://trac.macosforge.org/projects/launchd/changeset/23387 Author: zarzycki@apple.com Date: 2007-09-14 11:45:29 -0700 (Fri, 14 Sep 2007) Log Message: ----------- <rdar://problem/5482362> startupitem does not receive TERM signal Modified Paths: -------------- trunk/launchd/src/SystemStarter.c Modified: trunk/launchd/src/SystemStarter.c =================================================================== --- trunk/launchd/src/SystemStarter.c 2007-09-14 01:25:49 UTC (rev 23386) +++ trunk/launchd/src/SystemStarter.c 2007-09-14 18:45:29 UTC (rev 23387) @@ -47,6 +47,9 @@ static int system_starter(Action anAction, const char *aService); static void displayErrorMessages(StartupContext aStartupContext); static pid_t fwexec(const char *cmd, ...) __attribute__((sentinel)); +static void dummy_sig(int signo __attribute__((unused))) +{ +} int main(int argc, char *argv[]) @@ -60,7 +63,7 @@ EV_SET(&kev, SIGTERM, EVFILT_SIGNAL, EV_ADD, 0, 0, 0); r = kevent(kq, &kev, 1, NULL, 0, NULL); assert(r != -1); - signal(SIGTERM, SIG_IGN); + signal(SIGTERM, dummy_sig); while ((ch = getopt(argc, argv, "gvxirdDqn?")) != -1) { switch (ch) {