From owner-p4-projects@FreeBSD.ORG Fri Aug 26 14:19:02 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2D30116A421; Fri, 26 Aug 2005 14:19:02 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E47B816A41F for ; Fri, 26 Aug 2005 14:19:01 +0000 (GMT) (envelope-from soc-tyler@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B1D4F43D46 for ; Fri, 26 Aug 2005 14:19:01 +0000 (GMT) (envelope-from soc-tyler@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j7QEJ1vC053646 for ; Fri, 26 Aug 2005 14:19:01 GMT (envelope-from soc-tyler@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j7QEJ1Yh053639 for perforce@freebsd.org; Fri, 26 Aug 2005 14:19:01 GMT (envelope-from soc-tyler@freebsd.org) Date: Fri, 26 Aug 2005 14:19:01 GMT Message-Id: <200508261419.j7QEJ1Yh053639@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-tyler@freebsd.org using -f From: soc-tyler To: Perforce Change Reviews Cc: Subject: PERFORCE change 82618 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Aug 2005 14:19:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=82618 Change 82618 by soc-tyler@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) {