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?

ManuelSchneid3r
  • 113
  • 1
  • 6

2 Answers2

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)
Desperatuss0ccus
  • 252
  • 1
  • 4
  • 9
Tomasz Olszewski
  • 868
  • 9
  • 20
0

Probably because svnserve makes it's own pidfile.

Jeroen
  • 1,339
  • 7
  • 16