4.2 Printer Spooler Question

DavisJB james at drutx.UUCP
Tue Aug 27 01:53:20 AEST 1985


< Eat at Joe's >


In-Reply-To: your article <136 at cdstar.UUCP>

In reference to "cdstar!saltiel"'s question on mutilple spoolers
targeting one printer.  A rather simple solution to your problem
is a follows:

A while back I was working on an OA project on a small UNIXtm system.
The software for the OA included a whole gob of integrated packages
that also included its own spooling system.  The main vertical package
though, interfaced with the good ole UNIX spooling system.  At the
time I had the very same problem you are now.  I had new Diablo 80if
and laser printers everywhere printing everything mutlilplexed.

To solve this, I worked out a method of using a common "printer busy"
lock file.  In each of the different spooling filters, I added code
to check for the existance of the lockfile matched to the printer it
wanted.  Note that when a filter is executed, it needs to check if
the lock file is there, if not, create it and print away.  After it
is done printing (spooling) you need to wait a alittle before releasing
the lockfile.  This depends on the printers you use.  The Diablo took
a little time to reset after done printing so I waited about 10 seconds
before releasing the lock.  This cured the problem I had before when
a filter program was done, and another one grabed the lockfile, the
printer was still reseting (settling down) when the second filter
began output.  The result was anything but sane.

You might also want to put a pause in your filter after it grabs the
lockfile to give the printer alittle time to adjust to any new setup
commands.

You are on your own from here!


                                                        ___ 
                                                      =======
                                      ~             ===========
                                     ~             =-----=======
                              ~                   =-------======= 
                             __      _   _!__     =-------======= 
                        _   /  \_  _/ \  |::| ___ ==-----========   ~
                      _/ \_/^    \/   ^\/|::| |:|  ==========/^\_
  James B. Davis   /\/  ^ /  ^    / ^ ___|::|_|:|__|:|=====/  ^  \
                  /  \  _/ ^ ^   /    |::|--|:|---||:|==/  ^     ^\___
                _/_^  \/  AT&T Information Systems Denver Laboratory  \_
               /   \^ /   Computation  and Telecommunications Center    \
-------------------------------------------------------------------------
AT&T Information Systems
11900 N. Pecos St., DR31-Y31
Denver Colorado
(303) 538-1647
{ihnp4, mtuxo}!drutx!james
Disclaimer: I refuse to admit that I typed this.



More information about the Comp.unix mailing list