[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS: cvs.openbsd.org: src

Module name:	src
Changes by:	millert_(_at_)_cvs_(_dot_)_openbsd_(_dot_)_org	2002/06/13 00:48:40

Modified files:
	usr.sbin/lpr/common_source: common.c lp.h 
	usr.sbin/lpr/lpd: printjob.c 

Log message:
Fixed some lpd bugs while on the plane from Calgary:
o mark fatal() as __dead
o add SIGINT to the signal mask when installing abort() as a handler.
We can end up in abortpr() due to several different signals and since
abortpr() kill()s itself with SIGINT we need to explicately protect
against the current process receiving SIGINT while in abortpr()
o Don't leak the lock fd to children spawned by lpd
o Close the lock file (and thus unlocke immediately in abortpr().
Otherwise, if there is an output filter the lock file only gets
closed after we finish waiting for the output filter to die.
This causes a race condition in lprm such that the per-printer
daemon does not get restarted when lprm kills the active job
(noticed during c2k2 with the mp3 printer spool ;-)
o Open the printcap file with privs raised just in case it is not