[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] svnserve: write pid a bit earlier?

From: David Glasser <glasser_at_davidglasser.net>
Date: 2007-10-13 20:16:28 CEST

On 10/13/07, Eric Gillespie <epg@pretzelnet.org> wrote:
> Eric Gillespie <epg@pretzelnet.org> writes:
>
> > "David Glasser" <glasser@davidglasser.net> writes:
> >
> > > svnserve -d -r bla --pid-file .svnserve-pid
> > > spid=`cat .svnserve-pid`
> > > run some tests
> > > kill -9 $spid
> >
> > I don't object to your change, but all you do is shorten the
> > race: it's inherent in the pidfile practice. What you want is:
> >
> > svnserve -d -r bla --foreground &
> > spid=$!
> > run some tests
> > kill -9 $spid
>
> Now that I think about it, I think your patch is broken. You
> write the PID of the svnserve you started, but it then forks off
> the one that hangs around. I have not tested this, or even
> looked up apr_proc_detach, so I may be wrong.

Looking at the source for apr_proc_detach, you are correct and there
is no way that my patch works. On the other hand, I think my patch
works.

--dave

--
David Glasser | glasser_at_davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 13 20:16:37 2007

This is an archived mail posted to the Subversion Dev mailing list.