[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFH: start-stop-daemon, broken behavior when daemon already running



Replacing --exec with --startas seems to fix the issue.
I understand that --exec mail be wrong because the daemon is written in
perl, so the processus name wouldn't be what's passed to exec.
However --startas description is quite obvious to me and I don't
understand what it does exactly.

Adam Cécile (Le_Vert) a écrit :
> Hi,
> 
> Could you help to understand why start-stop-daemon do not return 1 when
> trying to start my daemon which is already running ?
> 
> Here is some log about what happens:
> 
> bash-3.1# start-stop-daemon --start --quiet --pidfile
> /var/run/dkimproxy.out-dkim.pid --exec /usr/local/bin/dkimproxy.out --
> --daemonize --keyfile=/etc/dkimproxy/private.key --selector=selector1
> --domain=le-vert.net --method=relaxed --signature=dkim
> --pidfile=/var/run/dkimproxy.out-dkim.pid 127.0.0.1:10027
> 127.0.0.1:10029; echo $?
> Becoming sub class of "Net::Server::PreFork"
> Pid_file already exists for running process (16640)... aborting
> 0
> 
> bash-3.1# cat /var/run/dkimproxy.out-dkim.pid
> 16640
> 
> bash-3.1# ps aux | grep 16640
> root     16640  0.0  1.0  13732  8420 ?        Ss   23:49   0:00
> /usr/bin/perl -I/usr/local/lib /usr/local/bin/dkimproxy.out --daemonize
> --keyfile=/etc/dkimproxy/private.key --selector=selector1
> --domain=le-vert.net --method=relaxed --signature=dkim
> --pidfile=/var/run/dkimproxy.out-dkim.pid 127.0.0.1:10027 127.0.0.1:10029
> root     16697  0.0  0.0   3540   760 pts/1    R+   23:49   0:00 grep 16640
> 
> 
> Thanks in advance,
> 
> Regards, Adam.
> 
> 



Reply to: