From c6301cab8e7185b9793940ee84ae2b6af3da1b8d Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Mon, 22 Aug 2011 16:30:23 +0000 Subject: [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) --- Foundation/GTMServiceManagement.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Foundation/GTMServiceManagement.c') 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, -- cgit v1.2.3