Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Nov 1995 09:45:38 +0100 (MET)
From:      grog@lemis.de (Greg Lehey)
To:        bmk@dtr.com
Cc:        hackers@freebsd.org (FreeBSD Hackers)
Subject:   Re: elm problem :)
Message-ID:  <199511170845.JAA24499@allegro.lemis.de>
In-Reply-To: <199511132326.PAA07428@dtr.com> from "bmk@dtr.com" at Nov 13, 95 03:26:12 pm

next in thread | previous in thread | raw e-mail | index | archive | help
bmk@dtr.com writes:
> 
> 
> > It seems that User GEOFF said:
> > > I found that if I compiled fcntl into elm it wouldn't work.  I had 
> > > /var/mail wide open and still couldn't get the locking working.  I had to 
> > > remove fcntl for it to work.
> 
> > Have you tried the port in /usr/ports/mail/elm ? My  Elm is not the same as
> > I try to follow M. Elkins patches (ME8b+ now :-)) but it should work.
> 
> I wasn't able to get it working with fcntl locking, either.  I compiled
> and installed it long before I knew of the existance of a port (one might
> have existed, I don't know).  I've always had to use flock style locking
> - fcntl always seemed to cause the symptoms the original complaint
> described.

I've followed this up a little, and now believe that fcntl locking is
broken.  I took an elm I compiled on BSD/386 (in fact, the one I'm
using now) and went through with gdb.  The result: the system call to
fcntl has identical parameters in each case:

(gdb) p lock_info
$1 = {
  l_type = 3, 
  l_whence = 0, 
  l_start = 0, 
  l_len = 0, 
  l_pid = 0
}

l_type is F_WRLCK, and it's calling fcntl with F_SETLK.  This works as
advertised with BSD/386, but returns with an invalid argument with
FreeBSD in all versions I've tried recently.

I haven't got any further (can somebody please tell me how to enter
ddb from the keyboard?  Something goes and messes up my keymap, so I
can't get in after booting), but intend to do so some time soon.

Greg




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199511170845.JAA24499>