[Fwd: Serious problem with mount(8)]

Pawel Jakub Dawidek pjd at FreeBSD.org
Tue May 22 20:13:51 UTC 2007

On Tue, May 22, 2007 at 10:05:57PM +0200, Dag-Erling Sm??rgrav wrote:
> Joe Marcus Clarke <marcus at FreeBSD.org> writes:
> > I really don't know why I didn't notice this before, but when mount was
> > converted to use the pidfile(3) API three months ago, the behavior of
> > mount(8) changed with regard to restarting mountd.  A pidfile client
> > cannot use pidfile_open(3) as this will truncate the pidfile.  The
> > result is that mount reads in a PID of 0, and when it tries to send a
> > SIGHUP to this PID, it kills itself.  Consequently, this is breaking the
> > ports Tinderbox.
> >
> > I suppose we could revert to the previous behavior, but use flopen() to
> > test if the file is actually locked.  Maybe something like this:
> >
> > http://www.marcuscom.com/downloads/mount.c.diff
> Better yet, extend the pidfile API with a function which reads the
> contents of a PID file and also checks whether it's locked.

That would be useful also for pkill(1).

Pawel Jakub Dawidek                       http://www.wheel.pl
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20070522/33be7b81/attachment.pgp

More information about the freebsd-current mailing list