[cups.development] cupsBackChannelRead() returns -1

Michael Sweet msweet at apple.com
Tue Mar 20 09:15:33 PDT 2012


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





More information about the cups-devel mailing list