You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Peter N. Lundblad" <pe...@famlundblad.se> on 2005/12/16 19:50:06 UTC
Add svnserve --pid-file option
Hi,
After having strugled with running RC testing and nightly test scripts in
parallell and having got problems killing the right svnserve, I really
feel the need to get the PID of th svnserve process somehow (not by
running ps and grepping for svnserve). I think this is pretty useful for
deamon administration tools and distributions as well.
So, I want to add a --pid-file option, taking a filename argument.
When svnserve has demonized (if it wants to), it writes the return value
of getpid() (and a newline) to that file. getpid() seems pretty portable
(Apache seems to use it directly).
I know that some people don't want svnserve to grow much further, but this
little improvement will probably be very helpful. This seems like a
twenty-liner or something to add.
Anyone objects?
Thanks,
//Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Add svnserve --pid-file option
Posted by Greg Hudson <gh...@MIT.EDU>.
That sounds fine.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Add svnserve --pid-file option
Posted by Marcus Rueckert <da...@web.de>.
On 2005-12-16 12:17:55 -0800, Michael Pilato wrote:
> +1. Won't this also serve as an enabler for something like
> an /etc/init.d/svnserve?
many distros have that already. and it is working quite nicely. except
killing of course. :) the pid file would be handy here.
darix
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Add svnserve --pid-file option
Posted by Michael Pilato <cm...@collab.net>.
On Fri, 2005-12-16 at 20:50 +0100, Peter N. Lundblad wrote:
> Hi,
>
> After having strugled with running RC testing and nightly test scripts in
> parallell and having got problems killing the right svnserve, I really
> feel the need to get the PID of th svnserve process somehow (not by
> running ps and grepping for svnserve). I think this is pretty useful for
> deamon administration tools and distributions as well.
>
> So, I want to add a --pid-file option, taking a filename argument.
> When svnserve has demonized (if it wants to), it writes the return value
> of getpid() (and a newline) to that file. getpid() seems pretty portable
> (Apache seems to use it directly).
>
> I know that some people don't want svnserve to grow much further, but this
> little improvement will probably be very helpful. This seems like a
> twenty-liner or something to add.
>
> Anyone objects?
+1. Won't this also serve as an enabler for something like
an /etc/init.d/svnserve?
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand
Re: [PATCH] Re: Add svnserve --pid-file option
Posted by "D.J. Heap" <dj...@gmail.com>.
On 12/17/05, Peter N. Lundblad <pe...@famlundblad.se> wrote:
[snip]
> We discussed this on IRC. I checked how Apache handles this, and it seems
> to just use getpid on all platforms. I don't know how it gets its
> declaration, except that it includes unistd.h where available. If someone
> could just check the attached patch on Windows before I commit it, it
> would be appreciated.
I built and tested it...worked fine. There is a note in the latest MS
docs that it is deprecated and the 'ISO C++ conformant' _getpid should
be used instead, however. </shrug>
DJ
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
[PATCH] Re: Add svnserve --pid-file option
Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Fri, 16 Dec 2005, Garrett Rooney wrote:
> On 12/16/05, Peter N. Lundblad <pe...@famlundblad.se> wrote:
> > So, I want to add a --pid-file option, taking a filename argument.
> > When svnserve has demonized (if it wants to), it writes the return value
> > of getpid() (and a newline) to that file. getpid() seems pretty portable
> > (Apache seems to use it directly).
> >
> +1, seems reasonable to me, although I'm not sure what it should do on
> systems without getpid()...
>
We discussed this on IRC. I checked how Apache handles this, and it seems
to just use getpid on all platforms. I don't know how it gets its
declaration, except that it includes unistd.h where available. If someone
could just check the attached patch on Windows before I commit it, it
would be appreciated.
I didn't bother to delete the pid file, since currently, svnserve doesn't
have any cleanup handling and it doesn't seem trivial to add this in a
portable way.
Thanks,
//Peter
Re: Add svnserve --pid-file option
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 12/16/05, Peter N. Lundblad <pe...@famlundblad.se> wrote:
> Hi,
>
> After having strugled with running RC testing and nightly test scripts in
> parallell and having got problems killing the right svnserve, I really
> feel the need to get the PID of th svnserve process somehow (not by
> running ps and grepping for svnserve). I think this is pretty useful for
> deamon administration tools and distributions as well.
>
> So, I want to add a --pid-file option, taking a filename argument.
> When svnserve has demonized (if it wants to), it writes the return value
> of getpid() (and a newline) to that file. getpid() seems pretty portable
> (Apache seems to use it directly).
>
> I know that some people don't want svnserve to grow much further, but this
> little improvement will probably be very helpful. This seems like a
> twenty-liner or something to add.
+1, seems reasonable to me, although I'm not sure what it should do on
systems without getpid()...
-garrett
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org