Re: agetty and fcntl_setlck()

Andrew Walker (andy@lysaker.kvaerner.no)
Mon, 20 May 1996 09:44:46 +0200 (MET DST)


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

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

--=20
Andy Walker Kvaerner Engineering a.s.
Andrew.Walker@lysaker.kvaerner.no P.O. Box 222, N-1324 Lysaker, =
Norway

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