diff options
author | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2011-08-22 16:30:23 +0000 |
---|---|---|
committer | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2011-08-22 16:30:23 +0000 |
commit | c6301cab8e7185b9793940ee84ae2b6af3da1b8d (patch) | |
tree | 09edd8ee63fa9069aebddebe856b118341e1674b | |
parent | 7841ead59a6b5c923818198908b127a0257ab51d (diff) |
[Author: mmentovai]
launchctl on Mac OS X 10.7 ("Lion") requires launchd plist pathnames
to end in ".plist".
Files that don't end in plist result in launchctl printing this
message and ignoring the file:
launchctl: Dubious file. Not of type .plist (skipping):
/tmp/GTMServiceManagement.W3Pz4K
http://crbug.com/93274
R=dmaclach,thomasvl
APPROVED=thomasvl
DELTA=3 (1 added, 1 deleted, 1 changed)
-rw-r--r-- | Foundation/GTMServiceManagement.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Foundation/GTMServiceManagement.c b/Foundation/GTMServiceManagement.c index de84ef9..e7859d3 100644 --- a/Foundation/GTMServiceManagement.c +++ b/Foundation/GTMServiceManagement.c @@ -491,7 +491,6 @@ Boolean GTMSMJobSubmit(CFDictionaryRef cf_job, CFErrorRef *error) { // to handle the sockets cases that we don't want to duplicate here. int fd = -1; CFDataRef xmlData = NULL; - char fileName[] = _PATH_TMP "GTMServiceManagement.XXXXXX"; CFErrorRef local_error = NULL; if (!cf_job) { @@ -531,7 +530,8 @@ Boolean GTMSMJobSubmit(CFDictionaryRef cf_job, CFErrorRef *error) { goto exit; } - fd = mkstemp(fileName); + char fileName[] = _PATH_TMP "GTMServiceManagement.XXXXXX.plist"; + fd = mkstemps(fileName, 6); if (fd == -1) { local_error = GTMCFLaunchCreateUnlocalizedError(errno, |