Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Sep 2005 01:56:01 GMT
From:      soc-tyler <soc-tyler@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 83089 for review
Message-ID:  <200509040156.j841u16r010390@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=83089

Change 83089 by soc-tyler@soc-tyler_launchd on 2005/09/04 01:55:14

	Update manpages and other documentation, remove testjob.launch as it is 
	no longer necessary for rudimentary testing.

Affected files ...

.. //depot/projects/soc2005/launchd/init.8#5 edit
.. //depot/projects/soc2005/launchd/launchctl/launchctl.1#4 edit
.. //depot/projects/soc2005/launchd/launchd.8#4 edit
.. //depot/projects/soc2005/launchd/launchd.c#21 edit
.. //depot/projects/soc2005/launchd/launchdebugd/launchdebugd.8#2 edit
.. //depot/projects/soc2005/launchd/launchers/testjob.launch#3 delete
.. //depot/projects/soc2005/launchd/launchproxy/launchproxy.8#2 edit

Differences ...

==== //depot/projects/soc2005/launchd/init.8#5 (text+ko) ====


==== //depot/projects/soc2005/launchd/launchctl/launchctl.1#4 (text+ko) ====

@@ -141,20 +141,6 @@
 .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
-Per-user agents provided by the user.
-.It Pa /Library/LaunchAgents
-Per-user agents provided by the administrator.
-.It Pa /Library/LaunchDaemons
-System wide daemons provided by the administrator.
-.It Pa /System/Library/LaunchAgents
-Mac OS X Per-user agents.
-.It Pa /System/Library/LaunchDaemons
-Mac OS X System wide daemons.
-.El
 .Sh SEE ALSO 
-.Xr launchd.plist 5 ,
 .Xr launchd.conf 5 ,
 .Xr launchd 8

==== //depot/projects/soc2005/launchd/launchd.8#4 (text+ko) ====

@@ -1,6 +1,6 @@
 .Dd September 30, 2004
 .Dt launchd 8 
-.Os Darwin
+.Os FreeBSD
 .Sh NAME
 .Nm launchd
 .Nd System wide and per-user daemon/agent manager
@@ -14,7 +14,7 @@
 .Sh DESCRIPTION
 .Nm 
 manages daemons, both for the system as a whole and for individual users. Ideal daemons can launch
-on demand based on criteria specified in their respective XML property lists located in one of the
+on demand based on criteria specified in their respective property lists located in one of the
 directories specified in the FILES section.
 .Pp
 When run with a command, a specific instance of
@@ -49,29 +49,11 @@
 This variable is exported when invoking a command via the launchd command line. It informs launchctl how to find the correct launchd to talk to.
 .El
 .Sh NOTES
-In Darwin it is preferable to have your daemon launch via launchd instead of modifying
-.Nm rc
-or creating a
-.Nm SystemStarter
-Startup Item.
+In FreeBSD, launchd(8) can not yet act as init(8) and control bootup daemons and jobs.
 .Pp
 At some point in the future, we hope to completely phase out the use of
 .Nm rc .
-.Sh FILES
-.Bl -tag -width "/System/Library/LaunchDaemons" -compact
-.It Pa ~/Library/LaunchAgents
-Per-user agents provided by the user.
-.It Pa /Library/LaunchAgents
-Per-user agents provided by the administrator.
-.It Pa /Library/LaunchDaemons
-System wide daemons provided by the administrator.
-.It Pa /System/Library/LaunchAgents
-Mac OS X Per-user agents.
-.It Pa /System/Library/LaunchDaemons
-Mac OS X System wide daemons.
-.El
+
 .Sh SEE ALSO 
 .Xr launchctl 1 ,
-.Xr launchd.plist 5 ,
-.Xr rc 8 ,
-.Xr SystemStarter 8
+.Xr rc 8 

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

@@ -37,7 +37,6 @@
 #include <mach/mach_error.h>
 #include <mach/port.h>
 #endif
-
 #endif
 
 #include <sys/types.h>
@@ -123,6 +122,12 @@
 	char label[0];
 };
 
+//! launchd's socket connection callback
+/*!
+ * this structure contains the basic data needed for our unix socket 
+ * connections that we create to communicate with launchctl via 
+ * "liblaunch"
+ */
 struct conncb {
 	kq_callback kqconn_callback;
 	TAILQ_ENTRY(conncb) tqe;
@@ -510,10 +515,6 @@
 		snprintf(ourdir, sizeof(ourdir), "%s/%u.%u", LAUNCHD_SOCK_PREFIX, getuid(), getpid());
 		snprintf(sun.sun_path, sizeof(sun.sun_path), "%s/%u.%u/sock", LAUNCHD_SOCK_PREFIX, getuid(), getpid());
 		setenv(LAUNCHD_SOCKET_ENV, sun.sun_path, 1);
-#ifdef _LAUNCHD_
-		fprintf(stderr, "Setting the socket path to \"%s\"\n", sun.sun_path);
-#endif
-
 	} else {
 		snprintf(ourdir, sizeof(ourdir), "%s/%u", LAUNCHD_SOCK_PREFIX, getuid());
 		snprintf(sun.sun_path, sizeof(sun.sun_path), "%s/%u/sock", LAUNCHD_SOCK_PREFIX, getuid());
@@ -2534,9 +2535,11 @@
 	}
 }
 
-/*
- * launch_fork() effectively replaces the functionality of 
- * fork_with_bootstrap_port() on non-MacOS boxen
+//! fork_with_bootstrap_port() replacement function
+/*! 
+ * launch_fork() does essentially what the 
+ * fork_with_bootstrap_port() function in MacOS' launchd
+ * source code, sans the mach-based calls
  */
 pid_t launch_fork() {
         static pthread_mutex_t forklock = PTHREAD_MUTEX_INITIALIZER;

==== //depot/projects/soc2005/launchd/launchdebugd/launchdebugd.8#2 (text+ko) ====

@@ -1,6 +1,6 @@
 .Dd February 2, 2005
 .Dt launchd_debugd 8 
-.Os Darwin
+.Os FreeBSD
 .Sh NAME
 .Nm launchd_debugd
 .Nd Simple HTTP server to display job data
@@ -17,5 +17,4 @@
 To enable (as root): "launchctl load -w /System/Library/LaunchDaemons/com.apple.launchd_helperd.plist"
 .Sh SEE ALSO 
 .Xr launchctl 1 ,
-.Xr launchd.plist 5 ,
 .Xr launchd 8

==== //depot/projects/soc2005/launchd/launchproxy/launchproxy.8#2 (text+ko) ====

@@ -1,6 +1,6 @@
 .Dd February 2, 2005
 .Dt launchproxy 8 
-.Os Darwin
+.Os FreeBSD
 .Sh NAME
 .Nm launchproxy
 .Nd inetd job emulation helper
@@ -15,5 +15,4 @@
 in the future.
 .Sh SEE ALSO 
 .Xr launchctl 1 ,
-.Xr launchd.plist 5 ,
 .Xr launchd 8



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200509040156.j841u16r010390>