From owner-p4-projects@FreeBSD.ORG Wed Aug 31 23:06:10 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 4D98716A421; Wed, 31 Aug 2005 23:06:10 +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 7C9F116A41F for ; Wed, 31 Aug 2005 23:06:09 +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 3E99243D48 for ; Wed, 31 Aug 2005 23:06:09 +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 j7VN69O3047972 for ; Wed, 31 Aug 2005 23:06:09 GMT (envelope-from soc-tyler@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j7VN68Gg047969 for perforce@freebsd.org; Wed, 31 Aug 2005 23:06:08 GMT (envelope-from soc-tyler@freebsd.org) Date: Wed, 31 Aug 2005 23:06:08 GMT Message-Id: <200508312306.j7VN68Gg047969@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 82947 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: Wed, 31 Aug 2005 23:06:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=82947 Change 82947 by soc-tyler@soc-tyler_launchd on 2005/08/31 23:05:26 Incorporate man page changes, and remove unnecessary function until I figure out what's causing the anti-thesis to the _correct_ behavior in launchctl ;) Affected files ... .. //depot/projects/soc2005/launchd/launchctl/launchctl.1#3 edit .. //depot/projects/soc2005/launchd/launchctl/launchctl.c#15 edit Differences ... ==== //depot/projects/soc2005/launchd/launchctl/launchctl.1#3 (text+ko) ==== @@ -1,4 +1,4 @@ -.Dd June 29, 2005 +.Dd September 30, 2004 .Dt launchctl 1 .Os FreeBSD .Sh NAME @@ -24,26 +24,55 @@ starts. .Sh SUBCOMMANDS .Bl -tag -width -indent -.It Xo Ar load Op Fl w +.It Xo Ar load Op Fl wF .Ar paths ... .Xc Load the specified configuration files or directories of configuration files. +Jobs that are not on-demand will be started as soon as possible. +All specified jobs will be loaded before any of them are allowed to start. .Bl -tag -width -indent .It Fl w Remove the disabled key and write the configuration files back out to disk. +.It Fl F +Force the loading of the plist. Ignore the Disabled key. .El .It Xo Ar unload Op Fl w .Ar paths ... .Xc Unload the specified configuration files or directories of configuration files. +This will also stop the job if it is running. .Bl -tag -width -indent .It Fl w Add the disabled key and write the configuration files back out to disk. .El -.It Ar start Ar joblabels ... -Start the specified jobs by label. -.It Ar stop Ar joblabels ... -Stop the specified jobs by label. Jobs may restart automatically if demand driven. +.It Xo Ar submit Fl l Ar label +.Op Fl p Ar executable +.Op Fl o Ar path +.Op Fl e Ar path +.Ar -- job ... +.Xc +A simple way of submitting a program to run without a configuration file. This mechanism also tells launchd to keep the program alive in the event of failure. +.Bl -tag -width -indent +.It Fl l Ar label +What unique label to assign this job to launchd. +.It Fl p Ar program +What program to really execute, regardless of what follows the -- in the submit sub-command. +.It Fl o Ar path +Where to send the stdout of the program. +.It Fl e Ar path +Where to send the stderr of the program. +.El +.It Ar remove Ar job_label +Remove the jobs from launchd by label. +.It Ar start Ar job_label +Start the specified jobs by label. The expected use of this subcommand is for +debugging and testing so that one can manually kick-start an on-demand server. +.It Ar stop Ar job_label +Stop the specified jobs by label. If a job is on-demand, launchd may immediately +restart the job if launchd finds any criteria that is satisfied. +Non-demand based jobs will always be restarted. Use of this subcommand is discouraged. +Jobs should ideally idle timeout by themselves. +finds any c. .It Ar list List all of the jobs loaded into .Nm launchd . @@ -107,6 +136,11 @@ .It Ar help Print out a quick usage statement. .El +.Sh ENVIRONMENTAL VARIABLES +.Bl -tag -width -indent +.It Pa LAUNCHD_SOCKET +This variable informs launchctl how to find the correct launchd to talk to. If it is missing, launchctl will use a built-in default. +.El .Sh FILES .Bl -tag -width "/System/Library/LaunchDaemons" -compact .It Pa ~/Library/LaunchAgents ==== //depot/projects/soc2005/launchd/launchctl/launchctl.c#15 (text+ko) ==== @@ -363,11 +363,13 @@ /* This function should mimic CF2launch_data in how it creates * a launch_data_t data structure from the contents of a .plist file */ +/* static launch_data_t Conf2launch_data(void *) { launch_data_t r; return r; } +*/ #endif #endif