PERFORCE change 82618 for review

soc-tyler soc-tyler at FreeBSD.org
Fri Aug 26 14:19:02 GMT 2005


http://perforce.freebsd.org/chv.cgi?CH=82618

Change 82618 by soc-tyler at soc-tyler_launchd on 2005/08/26 14:18:56

	Add testjob stuff to show zarzycki@

Affected files ...

.. //depot/projects/soc2005/launchd/launchctl/launchctl.c#11 edit
.. //depot/projects/soc2005/launchd/launchers/testjob.launch#1 add
.. //depot/projects/soc2005/launchd/testing/testjob.c#1 add

Differences ...

==== //depot/projects/soc2005/launchd/launchctl/launchctl.c#11 (text+ko) ====

@@ -73,6 +73,7 @@
  
 #include "launch.h"
 #include "launch_priv.h"
+#include "property.h"
 
 #define LAUNCH_SECDIR "/tmp/launch-XXXXXX"
 
@@ -323,20 +324,22 @@
 }
 
 #ifndef _BUILD_DARWIN
+#ifdef _LAUNCHD_
 static launch_data_t read_conf_file(const char *file, bool editondisk, bool load) {
 	/* fill this with an array of launch_data_t structs */
 	launch_data_t retval = NULL; 
-	properties conf_props;
+	properties conf_props; // libutil.h and -lutil are required for this..
 	int fd;
 	
 	fd = open(file, O_RDONLY);
+
 	if (fd == -1)
 		return NULL; /* calling function must check for a NULL pointer */
 		
 	conf_props = properties_read(fd); /* read in config data */
 	
 	retval = launch_data_alloc(LAUNCH_DATA_PROPERTY);
-	launch_data_set_opaque(retval, (const void *)(conf_props), sizeof(properties));
+	//launch_data_set_opaque(retval, (const void *)(conf_props), sizeof(properties));
 	
 	/* I figure we'll just add the properties(3) linked list to the 
 	 * opaque launch_data_t datatype (opaque ~= void *) 
@@ -348,6 +351,7 @@
 	return retval;
 }
 #endif
+#endif
 
 #ifdef _BUILD_DARWIN_
 static launch_data_t read_plist_file(const char *file, bool editondisk, bool load) {


More information about the p4-projects mailing list