02-20-06 12:48 PM
2006-02-19, 15:30(-08), norman@unnu.org:
>
>
> I don't want to run it as a daemon process.
What do you mean?
In which way don't you want it to be started as a daemon?
A daemon is called "daemon" usually by the nature of what it
does. There's no special way to start a daemon. That's some
process that runs on the /background/ and whose actions can be
invoked by other means that terminal interaction.
start-stop-daemon won't do anything special to start the
program, if you don't use the --background option.
If you use the --background option, it will detach the process
from the current terminal and its parent process, and have its
stdin/stdout/stderr point to /dev/null, which is a sensible
thing to do if that process is running in the background
independently of any terminal.
So
start-stop-daemon -Sbvmp /var/pid/sleep.pid -x /bin/sleep -- 100
will start sleep in background detached from the terminal.
start-stop-daemon -Svmp /var/pid/sleep.pid -x /bin/sleep -- 100 &
will start sleep as a background job of the current terminal (if
the shell supports job control). That will be the same as:
/bin/sleep 100 &
except for the handling of the pid file.
This, above is for the start-stop-debian found on debian, I
guess it's the same for other distribution.
$ start-stop-daemon --version
start-stop-daemon 1.13.13
$ start-stop-daemon --help
start-stop-daemon VERSION for Debian - small and fast C version written by
Marek Michalkiewicz <marekm@i17linuxb.ists.pwr.wroc.pl>, public domain.
[...]
--
Stéphane
[ Post a follow-up to this message ]
|