Subject: Re: Cups with parallel port
To: None <email@example.com>
From: Jeremy C. Reed <firstname.lastname@example.org>
Date: 10/03/2002 13:29:34
> > > The problem is that CUPS doesn`t show the parallel port in the list
> > > of available connections...
Okay, I added some debugging to cups-1.1.15/backend/parallel.c
here in NetBSD
parallel: /dev/lpt0 (16): Device busy
parallel: /dev/lpa0 (16): Device busy
parallel: /dev/lpt1 (13): Permission denied
parallel: /dev/lpa1 (13): Permission denied
parallel: /dev/lpt2 (13): Permission denied
parallel: /dev/lpa2 (13): Permission denied
It does open(device, O_WRONLY).
So the problem is error 16, "Device busy".
Sometimes, when I turn on or off the printer and run ./parallel at the
same time (within the one second), it successfully opens the /dev/lpt0 or
/dev/lpa0 (and no "Device busy).
Is "Device busy" a valid error for assuming that the parallel port is
never available for configuration for future printing?
Any comments or advice before I submit patch for pkgsrc and back to cups
(On a side note, open(2) manual doesn't mention "EBUSY".)
Jeremy C. Reed