Modified: trunk/launchd/src/launchd_core_logic.c (23244 => 23245)
--- 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;
}