[launchd-changes] [22967] trunk/launchd/src/launchd.c
source_changes at macosforge.org
source_changes at macosforge.org
Mon Dec 4 09:44:33 PST 2006
Revision: 22967
http://trac.macosforge.org/projects/launchd/changeset/22967
Author: zarzycki at apple.com
Date: 2006-12-04 09:44:33 -0800 (Mon, 04 Dec 2006)
Log Message:
-----------
It is probably, just probably, a good idea for the setjmp() to have a valid stack frame when returned to via longjmp(). :-P
Modified Paths:
--------------
trunk/launchd/src/launchd.c
Modified: trunk/launchd/src/launchd.c
===================================================================
--- trunk/launchd/src/launchd.c 2006-12-04 17:34:49 UTC (rev 22966)
+++ trunk/launchd/src/launchd.c 2006-12-04 17:44:33 UTC (rev 22967)
@@ -294,6 +294,21 @@
job_dispatch(fbj, true);
}
+ switch (setjmp(doom_doom_doom)) {
+ case SIGILL:
+ case SIGFPE:
+ syslog(LOG_EMERG, "We crashed at instruction: %p", crash_addr);
+ abort();
+ case SIGBUS:
+ case SIGSEGV:
+ syslog(LOG_EMERG, "We crashed trying to read/write: %p", crash_addr);
+ abort();
+ default:
+ abort();
+ case 0:
+ break;
+ }
+
if (getpid() == 1) {
handle_pid1_crashes_separately();
@@ -310,21 +325,6 @@
{
struct sigaction fsa;
- switch (setjmp(doom_doom_doom)) {
- case SIGILL:
- case SIGFPE:
- syslog(LOG_EMERG, "We crashed at instruction: %p", crash_addr);
- abort();
- case SIGBUS:
- case SIGSEGV:
- syslog(LOG_EMERG, "We crashed trying to read/write: %p", crash_addr);
- abort();
- default:
- abort();
- case 0:
- break;
- }
-
fsa.sa_sigaction = fatal_signal_handler;
fsa.sa_flags = SA_SIGINFO;
sigemptyset(&fsa.sa_mask);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20061204/d1c0d8ca/attachment.html
More information about the launchd-changes
mailing list