cupsBackChannelRead() returns -1

Phil Ineichen pineichen at yahoo.com
Thu Mar 22 05:14:24 PDT 2012


> > Michael Sweet wrote:
> >
> > > errno 11 is EDEADLK, not something we'd expect from reading the pipe.
> > > This is likely an Ubuntu issue.
> > >
> > >
> > > On Mar 20, 2012, at 8:09 AM, Phil Ineichen wrote:
> > >
> > >> The following code runs fine on CUPS 1.4.6 (Ubuntu 11.04)
> > >>
> > >> byte buf[16];
> > >> ssize_t bytesRead = cupsBackChannelRead((char*)buf, sizeof(buf), 2.5);
> > >> if(bytesRead == -1)
> > >> {
> > >>   fprintf(stderr, "DEBUG: cupsBackChannelRead failed, errno=%d\n",
> > >>   errno);
> > >> }
> > >> else if(bytesRead == 0)
> > >> {
> > >>   fprintf(stderr, "DEBUG: cupsBackChannelRead no data\n");
> > >> }
> > >> else
> > >> {
> > >>   fprintf(stderr, "DEBUG: cupsBackChannelRead has read %i bytes\n",
> > >>   bytesRead);
> > >> }
> > >>
> > >> But cupsBackChannelRead() returns -1 and errno 11 on CUPS 1.5.0 (Ubuntu
> > >> 11.10)!
> > >>
> > >> I am not sure what is causing this behavior (Ubuntu, driver or CUPS).
> > >>
> > >> Thank you!
> > >> _______________________________________________
> > >> cups-dev mailing list
> > >> cups-dev at easysw.com
> > >> http://lists.easysw.com/mailman/listinfo/cups-dev
> > >
> > > _________________________________________________________
> > > Michael Sweet, Senior Printing System Engineer, PWG Chair
> >
> > The Ubuntu headers (especially /usr/include/asm-generic/errno-base.h) define
> > errno 11 as EAGAIN (try again) (uname reports kernel version 2.6.32).
> > It might be a blocking/nonblocking issue?
> >
> > Helge
> >
>
> It is not a CUPS 1.5.0 issue since it works perfect with openSUSE 12.1. It looks like an Ubuntu 11.10 bug.
>
> Thank you

It is an Ubuntu 11.10 feature since the 'usb' backend of CUPS has no backchannel support in Oneiric (11.10). This problem will fixed in Precise (12.04).





More information about the cups mailing list