From: Carlos P. <cp...@ro...> - 2001-05-18 18:16:03
|
Allen Barnett <ba...@lo...> wrote: > I think I've diagnosed this problem. When ptal-mlcd is started by this > sequence of events: > > kernel -> khubd: notices a new device > khubd -> /sbin/hotplug add usb > /sbin/hotplug -> /etc/hotplug/usb.agent -> /etc/hotplug/usb/printer -> > ptal-mlcd > > It turns out that STDIN is not open when ptal-mlcd starts! Therefore, > when ptal-mlcd opens its command socket, /dev/ptal-mlcd/usb:0, that > socket gets file descriptor = 0. Later, ptal-mlcd closes STDIN in > consoleOpenQuiet, inadvertently closing the socket. > > (It didn't occur to me until just now that a simple fix might be to use > ptal-mlcd usb:0 -device /dev/usb/lp0 < /dev/null > in the script.) good catch! now, i would call it a work-around, rather :-) the other issue is how to unload the drivers when the printer is unplugged. |