home *** CD-ROM | disk | FTP | other *** search
- The standard lp(1) spooler in System V uses a variety of
- lockfiles in processing a job. This leaves a window of
- vulnerability if two jobs are received nearly simultaneously:
-
- lp job 1 checks to see if there is a lockfile,
- finds there isn't.
- lp job 2 checks to see if there is a lockfile,
- finds there isn't
- lp job 1 establishes the lockfile
- lp job 2 tries to establish the lockfile and fails.
-
- When this happens, the spooler croaks. Often the symptom is
- that jobs start piling up for printing but none ever are,
- sometimes it is more gory than that. The fix is sometimes
- to disable(1) the printer and then enable(1) it. Sometimes
- the only fix is to cancel(1) the pending jobs.
-
- This small program is another fix. It moves /usr/bin/lp to
- /usr/bin/real_lp, and subsitutes this program as /usr/bin/lp.
- Thus, you must be root to install the program.
-
- Essentially all this program does is throw up a semaphore,
- execs real_lp, and lowers the semaphore.
-
- We have been running this for two months without any failures
- or problems on an HP9000 Series 500 running Release 5.11 of
- HP-UX (System V.2). Because our application involves up to
- 200 one-page prints per day from 20 scattered users, prior to
- its installation our spooler was hanging every couple of days
- or so average with peaks of 2 or 3 hangs a day.
-
- You may want to check ipcs(1) and ipcrm(1) if you are unfamiliar
- with the System V semaphore facility.
- --
- David Harrison, Dept. of Physics, Univ. of Toronto
- {ihnp4,utzoo}!utgpu!utfyzx!harrison
-