Revision: 23013 http://trac.macosforge.org/projects/launchd/changeset/23013 Author: zarzycki@apple.com Date: 2007-01-18 12:37:42 -0800 (Thu, 18 Jan 2007) Log Message: ----------- Fix the last checkin. Modified Paths: -------------- trunk/launchd/src/launchctl.c trunk/launchd/src/launchd_core_logic.c Modified: trunk/launchd/src/launchctl.c =================================================================== --- trunk/launchd/src/launchctl.c 2007-01-18 20:13:26 UTC (rev 23012) +++ trunk/launchd/src/launchctl.c 2007-01-18 20:37:42 UTC (rev 23013) @@ -554,6 +554,9 @@ allowed_session = launch_data_get_string(tmps); if (strcasecmp(lus->session_type, allowed_session) == 0) { skipjob = false; + /* we have to do the following so job_reparent_hack() works within launchd */ + tmpa = launch_data_new_string(lus->session_type); + launch_data_dict_insert(thejob, tmpa, LAUNCH_JOBKEY_LIMITLOADTOSESSIONTYPE); break; } } Modified: trunk/launchd/src/launchd_core_logic.c =================================================================== --- trunk/launchd/src/launchd_core_logic.c 2007-01-18 20:13:26 UTC (rev 23012) +++ trunk/launchd/src/launchd_core_logic.c 2007-01-18 20:37:42 UTC (rev 23013) @@ -1288,12 +1288,8 @@ } else if (strcasecmp(key, LAUNCH_JOBKEY_LIMITLOADFROMHOSTS) == 0) { return; } else if (strcasecmp(key, LAUNCH_JOBKEY_LIMITLOADTOSESSIONTYPE) == 0) { - for (i = 0; i < value_cnt; i++) { - str = launch_data_get_string(launch_data_array_get_index(value, i)); - if (job_assumes(j, str != NULL)) { - job_reparent_hack(j, str); - } - } + job_log(j, LOG_NOTICE, "launchctl should have transformed the \"%s\" array to a string", LAUNCH_JOBKEY_LIMITLOADTOSESSIONTYPE); + return; } break; case 'q':
participants (1)
-
source_changes@macosforge.org