Reserving the printer

Greg Woods woods at eci386.uucp
Sat May 27 07:29:23 AEST 1989


In article <2465 at cveg.uucp> dws at cseg.uucp (David W. Summers) writes:
> 
> I have a question that I've not seen anyone address before.  I would like to be
> able to lock out the automatic spooling of print jobs and reserve the printer
> for my program's use until it is finished printing and then have the normal
> print spooling take effect again [....]

WHY?  If you want to share the printer, you have to respect the
protocol for doing so.

If you want exclusive access to the printer device, you MUST
disable the scheduler, or prevent it from using the particular
device.  To do this you must have "lpadmin" privileges and use the
commands documented and supplied for doing so.

If this is not sufficient, then perhaps you might consider writing
a new spooler package, adapting a "PD" version, or buying a third
party solution.

Admittedly one could eventually deduce the scheme lpsched uses to
enable and disable printers, etc.  However to do this will be
difficult, and will make your system dependent upon the current
version of the spooler.  I can tell you for a fact that the System V
Release 3.2 spooler is significantly different than the previous
versions, and may in fact provide the functionality you desire in
a more palatable manner.

If you are trying to design a method for managing different
"forms" on a single printer, and you want it to work with the
pre-SysVr3.2 spoolers, might I suggest using classes.  Print jobs
may be queued to a particular printer "class" which may represent a
certain form.  When this form is loaded into the printer, this
class may be enabled and those jobs will be printed.  While the
printer is disabled during the forms loading, alignment output may
be sent to the printer device directly to facilitate forms loading.
However since this will likely always be done by a human, human
intervention to the spooler is not so big an obstacle.
-- 
						Greg A. Woods

woods@{{utgpu,eci386,ontmoh,tmsoft}.UUCP,gpu.utcs.UToronto.CA,utorgpu.BITNET}
+1-416-443-1734 [h]  +1-416-595-5425 [w]		Toronto, Ontario CANADA



More information about the Comp.unix.xenix mailing list