1
$ ps aux | grep svn
root      **4458** ... /usr/bin/svnserve -d -r /var/svn
manuel    4466 ... grep --color=auto svn
$ sudo kill **4458**
$ sudo rm /var/run/svnserve.pid
$ sudo start-stop-daemon --start --make-pidfile --pidfile /var/run/svnserve.pid --exec /usr/bin/svnserve -- -d -r /var/svn
$ cat /var/run/svnserve.pid
**4474**
$ ps aux | grep svn
root     **4477**  ... /usr/bin/svnserve -d -r /var/svn
manuel    4480     ... grep --color=auto svn

Why is start-stop-daemon saving wrong pids?

  • What is the process behind the actual PID? – gertvdijk Dec 13 '12 at 13:22
3

You used the -d flag in svnserve, which means that svnserve forks, and child processes will have different pids, than the parent svnserve process.

start-stop-daemon doesn't know about child process pids.

Suggestion:

  • Use pid-file from svnserve to determine pid number (And remove the make-pidfile argument.)
  • Disable forking in svnserve, and configure start-stop-daemon to do this as well (there is an example on the bottom of manpage)
  • But where is the svnserve.pid file? – ManuelSchneid3r Dec 13 '12 at 12:21
  • 2
    You need to add --pid-file parameter to svnserve command, example: start-stop-daemon --start -p /var/run/svnserve.pid --exec /usr/bin/svnserve -- -d -r /mnt/ --pid-file /var/run/svnserve.pid – Tomasz Olszewski Dec 13 '12 at 12:24
  • Damn. Thats what I've overlooked. svnserve itself has a --pid-file option. Thanks – ManuelSchneid3r Jan 16 '13 at 13:45
0

Probably because svnserve makes it's own pidfile.

  • oh do you know where this is or how i should handle this? – ManuelSchneid3r Dec 13 '12 at 11:45
  • depends on what you exactly want it to do. You can either remove the --make-pidfile and make sure the --pidfile points to the svnserve pidfile. – Jeroen Dec 13 '12 at 11:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.