Date: Wed, 31 Aug 2005 23:06:08 GMT From: soc-tyler <soc-tyler@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 82947 for review Message-ID: <200508312306.j7VN68Gg047969@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508312306.j7VN68Gg047969>