[cups.bugs] tcgetattr() causes lockup in USB backend on FreeBSD 6-STABLE

Peter van Heusden pvh at wfeet.za.net
Thu May 3 04:57:29 PDT 2007


I recently upgrade CUPS on my FreeBSD 6-STABLE server to version 1.2.10,
and it took a while to get the USB backend working (I have a USB-connect
HP LaserJet 1010). After some debugging, it turned out that the code in
usb-unix.c that calls tcgetattr() on /dev/ulptN in print_device() was at
fault - what happens is that tcgetattr() blocks, and the USB backend
then hangs. I'm still waiting for a response from the FreeBSD developers
on this behaviour, but in any event from my reading of the kernel it
seems that ioctl() on a FreeBSD ulpt is a no-op anyway.

I see in the SVN repository that use_bc is set to 0 for NetBSD - maybe
it should be set to 0 on FreeBSD as well? The FreeBSD ulpt driver man
page mentions that it was migrated from NetBSD, so I suspect the same
issues exist in both operating systems.

Peter
P.S. my temporary workaround is to just disallow the cups user from
reading /dev/ulpt0. ;)





More information about the cups mailing list