1 .\" Copyright (c) 1999 Berkeley Software Design, Inc. All rights reserved.
3 .\" Redistribution and use in source and binary forms, with or without
4 .\" modification, are permitted provided that the following conditions
6 .\" 1. Redistributions of source code must retain the above copyright
7 .\" notice, this list of conditions and the following disclaimer.
8 .\" 2. Redistributions in binary form must reproduce the above copyright
9 .\" notice, this list of conditions and the following disclaimer in the
10 .\" documentation and/or other materials provided with the distribution.
11 .\" 3. Berkeley Software Design Inc's name may not be used to endorse or
12 .\" promote products derived from this software without specific prior
13 .\" written permission.
15 .\" THIS SOFTWARE IS PROVIDED BY BERKELEY SOFTWARE DESIGN INC ``AS IS'' AND
16 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 .\" ARE DISCLAIMED. IN NO EVENT SHALL BERKELEY SOFTWARE DESIGN INC BE LIABLE
19 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 .Nd run detached from the controlling terminal
40 .Ar command arguments ...
44 utility detaches itself from the controlling terminal and
45 executes the program specified by its arguments.
46 Privileges may be lowered to the specified user.
48 The options are as follows:
49 .Bl -tag -width indent
51 Change the current working directory to the root
54 Redirect standard input, standard output and standard error to
57 Write the ID of the created process into the
62 The program is executed in a spawned child process while the
64 waits until it terminates to keep the
66 locked and removes it after the process exits.
69 owner is the user who runs the
71 regardless of whether the
73 option is used or not.
75 Supervise and restart the program if it has been terminated.
77 Login name of the user to execute the program under.
78 Requires adequate superuser privileges.
85 option is specified the program is executed in a spawned child process.
88 waits until it terminates to keep the pid file locked and removes it
89 after the process exits or restarts the program.
90 In this case if the monitoring
92 receives software termination signal (SIGTERM) it forwards it to the
94 Normally it will cause the child to exit followed by the termination
95 of the supervising process after removing the pidfile.
99 utility exits 1 if an error is returned by the
101 library routine, 2 if the
103 is requested, but cannot be opened, 3 if process is already running (pidfile
104 exists and is locked),
107 If the command cannot be executed, an error message is displayed on
108 standard error unless the
122 utility first appeared in