Re: agetty and fcntl_setlck()

Andrew Walker (
Mon, 20 May 1996 09:44:46 +0200 (MET DST)

Thomas K=F6nig wrote:
> pre2.0.6 complains about agetty 1.9.1a (the latest version I could fi=
> having a brocken flock() emulation. A look at the sources reveals th=
> agetty uses fcntl() directly.
> This should be fixed before 2.0 comes out, and noted in ~linux/Change=

What you're probably seeing is that the routines to write wtmp/utmp
are calling flock() to lock these files while updating them. So as
far as the kernel goes there's nothing to fix. You'll probably be able
to spot the extraneous flock()->fcntl() call by strace'ing agetty.


Andy Walker Kvaerner Engineering a.s. P.O. Box 222, N-1324 Lysaker, =

......if the answer isn't violence, neither is your silence......