[launchd-changes] [23836] branches/PR-6564965/launchd/src
source_changes at macosforge.org
source_changes at macosforge.org
Thu Feb 26 15:50:12 PST 2009
Revision: 23836
http://trac.macosforge.org/projects/launchd/changeset/23836
Author: dsorresso at apple.com
Date: 2009-02-26 15:50:12 -0800 (Thu, 26 Feb 2009)
Log Message:
-----------
Bug fixes.
Modified Paths:
--------------
branches/PR-6564965/launchd/src/launchctl.c
branches/PR-6564965/launchd/src/launchd.c
branches/PR-6564965/launchd/src/launchd_core_logic.c
branches/PR-6564965/launchd/src/vproc_priv.h
Modified: branches/PR-6564965/launchd/src/launchctl.c
===================================================================
--- branches/PR-6564965/launchd/src/launchctl.c 2009-02-26 23:32:14 UTC (rev 23835)
+++ branches/PR-6564965/launchd/src/launchctl.c 2009-02-26 23:50:12 UTC (rev 23836)
@@ -339,7 +339,7 @@
}
char *db = NULL;
- vproc_err_t verr = vproc_swap_string(NULL, VPROC_GSK_JOB_ENABLED_DB, NULL, &db);
+ vproc_err_t verr = vproc_swap_string(NULL, VPROC_GSK_JOB_OVERRIDES_DB, NULL, &db);
if( verr ) {
fprintf(stderr, "Could not get location of job state database.\n");
g_job_overrides_db_path[0] = 0;
@@ -733,7 +733,7 @@
}
CFStringRef label = CFDictionaryGetValue(plist, CFSTR(LAUNCH_JOBKEY_LABEL));
- if( label && CFGetTypeID(label) == CFStringGetTypeID() ) {
+ if( g_job_overrides_db && label && CFGetTypeID(label) == CFStringGetTypeID() ) {
CFDictionaryRef overrides = CFDictionaryGetValue(g_job_overrides_db, label);
if( overrides ) {
CFDictionaryApplyFunction(overrides, (CFDictionaryApplierFunction)job_override, (void *)plist);
Modified: branches/PR-6564965/launchd/src/launchd.c
===================================================================
--- branches/PR-6564965/launchd/src/launchd.c 2009-02-26 23:32:14 UTC (rev 23835)
+++ branches/PR-6564965/launchd/src/launchd.c 2009-02-26 23:50:12 UTC (rev 23836)
@@ -405,7 +405,7 @@
strcpy(g_job_overrides_db_path, LAUNCHD_JOB_OVERRIDES_DB_PREFIX "/com.apple.launchd/overrides.plist");
struct stat sb;
- if( stat(g_job_overrides_db_path, &sb) == -1 && launchd_assumes(errno == ENOENT) ) {
+ if( stat(dirname(g_job_overrides_db_path), &sb) == -1 && launchd_assumes(errno == ENOENT) ) {
launchd_assumes(mkdir(g_job_overrides_db_path, S_IRWXO) != -1);
}
}
Modified: branches/PR-6564965/launchd/src/launchd_core_logic.c
===================================================================
--- branches/PR-6564965/launchd/src/launchd_core_logic.c 2009-02-26 23:32:14 UTC (rev 23835)
+++ branches/PR-6564965/launchd/src/launchd_core_logic.c 2009-02-26 23:50:12 UTC (rev 23836)
@@ -6860,8 +6860,8 @@
launch_data_free(output_obj);
break;
- case VPROC_GSK_JOB_ENABLED_DB:
- if( !(output_obj = launch_data_new_string(g_job_overrides_db_path)) ) {
+ case VPROC_GSK_JOB_OVERRIDES_DB:
+ if( !job_assumes(j, (output_obj = launch_data_new_string(g_job_overrides_db_path)) != NULL) ) {
goto out_bad;
}
packed_size = launch_data_pack(output_obj, (void *)*outval, *outvalCnt, NULL, NULL);
Modified: branches/PR-6564965/launchd/src/vproc_priv.h
===================================================================
--- branches/PR-6564965/launchd/src/vproc_priv.h 2009-02-26 23:32:14 UTC (rev 23835)
+++ branches/PR-6564965/launchd/src/vproc_priv.h 2009-02-26 23:50:12 UTC (rev 23836)
@@ -64,7 +64,7 @@
VPROC_GSK_SHUTDOWN_DEBUGGING,
VPROC_GSK_PERUSER_SUSPEND,
VPROC_GSK_PERUSER_RESUME,
- VPROC_GSK_JOB_ENABLED_DB,
+ VPROC_GSK_JOB_OVERRIDES_DB,
} vproc_gsk_t;
typedef unsigned int vproc_flags_t;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/launchd-changes/attachments/20090226/e0ec3a2a/attachment-0001.html>
More information about the launchd-changes
mailing list