[launchd-changes] [23043] trunk/launchd/src/shutdown_debugger.c
source_changes at macosforge.org
source_changes at macosforge.org
Thu Feb 8 07:34:55 PST 2007
Revision: 23043
http://trac.macosforge.org/projects/launchd/changeset/23043
Author: zarzycki at apple.com
Date: 2007-02-08 07:34:54 -0800 (Thu, 08 Feb 2007)
Log Message:
-----------
<rdar://problem/4983556> Shutdown sampling is holding up system shutdown
Modified Paths:
--------------
trunk/launchd/src/shutdown_debugger.c
Modified: trunk/launchd/src/shutdown_debugger.c
===================================================================
--- trunk/launchd/src/shutdown_debugger.c 2007-02-08 15:21:26 UTC (rev 23042)
+++ trunk/launchd/src/shutdown_debugger.c 2007-02-08 15:34:54 UTC (rev 23043)
@@ -33,6 +33,7 @@
static void populate_proc_list(void);
static void debug_machports(pid_t pid, const char *pname);
static void debug_machports2(pid_t pid, FILE *where);
+static void do_stackshot(void);
static int kq;
@@ -70,6 +71,8 @@
closedir(thedir);
+ do_stackshot();
+
assert((kq = kqueue()) != -1);
debug_machports(1, "launchd");
@@ -524,3 +527,11 @@
fprintf(where, "Finished.\n");
return;
}
+
+void
+do_stackshot(void)
+{
+ /* yes, we really mean to exec without fork at this point in time */
+ execl("/usr/libexec/stackshot", "/usr/libexec/stackshot", "-i", "-f", "./shutdown-stackshot.log", NULL);
+ _exit(EXIT_FAILURE);
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20070208/e0ed04df/attachment.html
More information about the launchd-changes
mailing list