Hi all,
I'm currently trying to find a way to set up svnserve in a way that I
can start and stop svnserve processes from a script (I want this to work
from init.d, but the problem is really more general).
Currently, I can say "svnserve -d <additional parameters>" and have it
go to the background. However, to stop it, I need the process id for the
"kill" command - but I haven't found a way to get that process id! The
process ids that get recorded are always off-by-one to the process
that's actually executing as a daemon.
This was checked with:
* "svnserve -d &" and looking at the "[#] pid" output from the shell;
* Debian's "start-stop-daemon --start --pidfile /var/run/svnserve.pid
--make-pidfile --exec /usr/bin/svnserve -- -d", which essentially does
the same thing but writes the child PID into /var/run/svnserve.pid .
My current hypothesis is that svnserve immediately respawns itself and
exits. If that's the case, I think it is a bug: the process ID of the
spawned child cannot be guessed, so there's no way to identify the
process that should be killed (particularly if other users have started
their own copies of svnserve, as they are entitled to do).
Fix: Give svnserve an additional parameter to specify a PID file. Have
the child process create/overwrite that PID file with its process id. A
typical syntax for that would be
svnserve -p <pidfile>
or
svnserve --pid-file <pidfile>
I'm using svnserve V1.1.4 (r13838).
I'll file this as an Issue if there's agreement that should be done.
Regards,
Jo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Nov 8 11:07:10 2005