*BSD News Article 22033


Return to BSD News archive

Xref: sserve comp.unix.questions:40073 comp.unix.bsd:12724 comp.sys.sun.admin:19396
Newsgroups: comp.unix.questions,comp.unix.bsd,comp.sys.sun.admin
Path: sserve!newshost.anu.edu.au!munnari.oz.au!metro!extro.ucc.su.OZ.AU!matth
From: matth@extro.ucc.su.OZ.AU (Matthew Hannigan)
Subject: SUMMARY (where are lpr's locks?)
Message-ID: <matth.750044107@extro.ucc.su.OZ.AU>
Summary: need to reboot to get rid of bogus lock
Sender: news@ucc.su.OZ.AU
Nntp-Posting-Host: extro.ucc.su.oz.au
Organization: Information Services, Sydney University, Sydney, NSW, Australia
Date: Fri, 8 Oct 1993 01:35:07 GMT
Lines: 21


Hi,
	I originally asked a question along these lines:
		Sometimes I've had to kill lpd because the printer has
		fouled up and lpd/lpr seems unresponsive.  On
		restarting sometimes, lpr and then lpq gives the
		message 'waiting for lock on /dev/ttyxx'.  How do I get
		rid of this bogus lock?

The answer in summary, is that is not a file based lock at all,
but a fcntl/flock/lockf sort of thing.  (I checked this using
trace(1) but not forget which of the three it was. flock I think)

Killing lpd and restarting does not get rid of the lock.

The only way to get rid of it seems to be to reboot. :-)

Thanks for your replies,
	-Matt Hannigan

PS. I'm using SunOS 4.1.3