IPB
>  Man Pages > Linux > openSUSE 10.2 > Section 8 > start_daemon man page

start_daemon man page

Section 8 - openSUSE 10.2 Man Pages

Other operating system man pages available here


Advanced Search

Hopefully, this page is exactly what you are looking for, but if not, you can always find further assistance on Unix/Linux Forum!


STARTPROC(8)                 The SuSE boot concept                STARTPROC(8)



NAME
       Startproc - Start processes identified by path name
       Start_daemon - Start processes identified by path name

SYNOPSIS
       startproc [-f] [-L] [[-n ]+/-<prio>] [-s] [-t sec] [-u user] [-g group]
       [-v] [-e] [-l log_file |-q|-d] [-p pid_file] [-i ignore_file] [-c root]
       /path/to/executable [arguments for executable]

       start_daemon  [-f]  [-n  +/-<prio>]  /path/to/executable [arguments for
       executable]

DESCRIPTION
       startproc and the LSB variant start_daemon check for all  processes  of
       the  specified executable and starts it if no processes are found. Note
       that startproc is designed to start a daemon but not a kernel thread or
       a program which enables a kernel thread.

       startproc  does  not  use  the pid to search for a process but the full
       path of the corresponding program which is used to  identify  the  exe-
       cutable  (see proc(5)).  Only if the inode number (/proc/<pid>/exe) and
       the full name are unavailable  (/proc/<pid>/cmdline)  or  if  the  exe-
       cutable  changes  its  zeroth  argument,  startproc  uses the base name
       (/proc/<pid>/stat) to identify the running program.

       Extended functionality is provided by the -p option (former  option  -f
       changed  due  to  the LSB specification).  If this option is specified,
       startproc tries to check against the pid read from this file instead of
       the  default (/var/run/<basename>.pid).  The pid read from this file is
       compared against the pids of possible running processes  that  use  the
       specified executable. In order to avoid confusion with stale pid files,
       a not up-to-date pid will be ignored.

       For the possibility of having two different sessions of one binary pro-
       gram,  the option -i ignore_file allows to specify a pid file which pid
       number is used to ignore all processes of  corresponding  process  ses-
       sion.

       The option -v makes startproc print out verbose diagnostics.


REQUIRED
       /path/to/executable
              Specifies the executable by its full path name. This argument is
              always required. Everything that follows this path is considered
              options  for  the executable to be launched. Further information
              can be obtained from the respective manpage(s).

OPTIONS
       [-n ]+/-<prio>
              Set the nice level for the process. If used, this option  should
              always  be the first in the command line.  The nice level <prio>
              may be specified in the range between -20 and +20.  Only root is
              allowed to set negative nice values.

       -e     Bequeath  only a minimal set of environment variables to the new
              process: HOME, PATH, SHELL, RUNLEVEL, and PREVLEVEL.

       -p pid_file
              (Former option -f changed due to the LSB specification.)  Use an
              alternate  pid  file  instead  of  the  default (/var/run/<base-
              name>.pid).  The pid  read  from  this  file  is  being  matched
              against  the  pid  of  running processes that have an executable
              with specified path.  of the program.  In order to avoid  confu-
              sion with stale pid files, a not up-to-date pid will be ignored.

       -i ignore_file
              The pid found in this file is used as session  id  of  the  same
              binary program which should be ignored by startproc.

       -f     This option is required by the Linux Standard Base Specification
              (LSB).  With this option the start of a process is forced.

       -g group
              Sets the group ID of the process to gid.

       -l log_file
              Redirect the process standard output and standard error  to  the
              file log_file.

       -L     This  option  causes  symlinks to be followed, as the like-named
              option in ls(1).  BR Note : for the file name the original  name
              of the program is used instead of the name of the symbolic link.

       -c root
              Change root directory to root.  Services which have been started
              with  this  option  can only be checked by checkproc(8) and sig-
              naled by killproc(8) if checkproc(8) and killproc(8) are  called
              with the same option argument for the option -c.

       -q     Equals to -l /dev/null (supresses output).

       -d     Let  startproc  expect that the started service will do a dialog
              by prompting for, e.g. a  passphrase.   This  option  implies  a
              timeout of 15 seconds (-t 15).

       -s     Starts  the  process in a new session. The new task is a process
              group leader and has no controlling tty.

       -t sec The number of seconds to wait after the successful  start  of  a
              service.   This  options  accepts the number of seconds to wait.
              You can specify some units after a given number: s for  seconds,
              m for minutes, and h for hours to wait.

       -u user
              Sets the user ID of the process to user.

       -v     Verbose output.

EXAMPLE
       startproc /usr/sbin/sendmail

              starts  /usr/sbin/sendmail if no sendmail process is found. If a
              pid file sendmail.pid exists in /var/run/, then the pid found in
              this file is used to search the process table for a process with
              an   executable   that   matches   the    specified    pathname,
              /usr/sbin/sendmail.    If   no   matching   process   is  found,
              /usr/sbin/sendmail is launched.

       startproc -p /var/myrun/lpd.pid /usr/sbin/lpd

              starts /usr/sbin/lpd if there is no process with the  pid  found
              in /var/myrun/lpd.pid and no process in the actual process table
              exists that uses the specified binary.

EXIT CODES
       The exit codes have the following LSB conform conditions:


              0    Success

              1    Generic or unspecified error

              2    Invalid or excess argument(s)

              4    Insufficient privilege(s)

              5    Program is not installed

              7    Program is not running

       In some error cases, diagnostic output is sent to standard  error,  or,
       if standard error is not available, syslogd(8) is being used.

NOTE
       startproc  is  a replacement for the Bourne shell function daemon found
       in  the  widely  used  SysVinit  package  of  Miquel  van  Smoorenburg,
       <miquels@cistron.nl>.  startproc is not useful to start kernel threads.
       This should be done by service utilities designed for  the  purpose  to
       accomplish this task.

BUGS
       Identifying  a process based on the executable file and the correspond-
       ing inode number only works if the process stays  alive  during  start-
       proc's  execution.  Processes  rewriting their zeroth argument or shell
       scripts (the inode number of the shell executable file is not identical
       to that of the script file) may not be identified by a filename path.

       Startproc does not start a process if there already exists one being in
       the zombie state.  Zombies are processes which arn't alive  but  listed
       in  the process table to have the exit status ready for the correspond-
       ing parent processes.  Therefore the parent processes should  be  check
       out.

FILES
       /proc/ path to the proc file system (see proc(5)).

       /etc/init.d/
              path  to the SuSE boot concept script base directory as required
              by  the  Linux  Standard    Base    Specification   (LSB)   (see
              init.d(7)).

SEE ALSO
       checkproc(8),  killproc(8),  insserv(8),  init.d(7), kill(1), skill(1),
       killall(8), killall5(8), signal(7), proc(5).

COPYRIGHT
       1994-2000 Werner Fink, 1996-2000 SuSE GmbH Nuernberg, Germany.

AUTHOR
       Werner Fink <werner@suse.de>



3rd Berkeley Distribution        Nov 10, 2000                     STARTPROC(8)


Man(1) output converted with man2html and wrapped by fishsponge

This page was generated on Sat Sep 8 16:40:26 GMT 2007

Your favourite pages:

No pages logged yet.
Trying to save cookie...

Top 10 most popular pages:

svn man page (6167 hits)
(FreeBSD 6.2)

sqlite3 man page (5599 hits)
(openSUSE 10.2)

adv_cap_autoneg man page (5045 hits)
(Solaris 10 11_06)

CPAN man page (4791 hits)
(Suse Linux 10.1)

ssh man page (4439 hits)
(Suse Linux 10.1)

ssh-socks5-proxy-connect man page (3525 hits)
(Solaris 10 11_06)

signal man page (3395 hits)
(Suse Linux 10.1)

netcat man page (3386 hits)
(Suse Linux 10.1)

pprosetup man page (2893 hits)
(Solaris 10 11_06)

startproc man page (2740 hits)
(Suse Linux 10.1)

Useful Links

Go Back

Visitor Statistics


Valid XHTML 1.0 Transitional     Valid CSS!

Partners: Cambridge Plus :: Pyrenees Ski Holidays :: Stainless Steel Footswitch :: <Link Available>
Unix Man Pages / Linux Man Pages :: HiFi Forum :: SIP VoIP Phone & Provider Reviews :: UNIX/Linux Forum Archives

More info on advertising on Unix/Linux Forum