On Tue, Dec 17, 2002 at 01:05:37PM -0800, Nate wrote:
> I am writing a program that switches (mutually exclusive) between using lp
> and ppdev depending on the settings the user desires, (lp for real printing
> and ppdev for data transferring). So I am loading on demand the required
> module. That part is working, however, if I am trying to print to a printer
> everything works as I expect as long as there is a printer physically
> connected. The problem is when there is no printer connected. I am trying
> to put in some "timeout" code for this situation.
> I am doing an ioctl call with LPGETSTATUS. I see in the lp.c code that the
> said case calls "lp_claim_parport_or_block(...)". In my program, it is
> looks like it is blocking. It looks locked up. Is that because I have not
> previously claimed the port? Is there a similar call to find the status
> which won't block?
If the lp driver is in interrupt-driven mode it holds on to the port
too long. Known issue.
You can send a signal to the process holding the port lock, and it
-- To unsubscribe, send mail to: email@example.com --
-- with the single word "unsubscribe" in the body of the message. --
This archive was generated by hypermail 2b29 : Tue Dec 17 2002 - 18:38:30 EST