Revision: 23245 http://trac.macosforge.org/projects/launchd/changeset/23245 Author: zarzycki@apple.com Date: 2007-05-07 14:52:13 -0700 (Mon, 07 May 2007) Log Message: ----------- <rdar://problem/5159767> 9A423: Bugs reported by launchd Modified Paths: -------------- trunk/launchd/src/launchd_core_logic.c Modified: trunk/launchd/src/launchd_core_logic.c =================================================================== --- trunk/launchd/src/launchd_core_logic.c 2007-05-07 21:41:43 UTC (rev 23244) +++ trunk/launchd/src/launchd_core_logic.c 2007-05-07 21:52:13 UTC (rev 23245) @@ -931,7 +931,7 @@ return NULL; } - job_reparent_hack(jr, "Aqua"); + job_reparent_hack(jr, NULL); if (getpid() == 1) { struct ldcred ldc; @@ -5155,7 +5155,14 @@ { jobmgr_t jmi = NULL; - if (strcasecmp(where, "Aqua") != 0 && strcasecmp(where, "LoginWindow") != 0) { + /* NULL is only passed for our custom API for LaunchServices. If that is the case, we do magic. */ + if (where == NULL) { + if (strcasecmp(j->mgr->name, "LoginWindow") == 0) { + where = "LoginWindow"; + } else { + where = "Aqua"; + } + } else if (strcasecmp(where, "Aqua") != 0 && strcasecmp(where, "LoginWindow") != 0) { return; }
participants (1)
-
source_changes@macosforge.org