[cups.bugs] [MOD] STR #3001: backend runloop spins on backchannel EOF

Martin Pitt martin.pitt at canonical.com
Sun Nov 16 08:02:53 PST 2008


Hi Michael,

Michael Sweet [2008-11-14 11:50 -0800]:
> Please test the attached alternate patch, which logs the read error and
> then disables back-channel reads until the job is done or we fail on a
> write...

I asked the three reporters in the Debian bug to test it, since I
don't experience the problem myself.

> --- backend/runloop.c	(revision 8127)
> +++ backend/runloop.c	(working copy)
> @@ -283,6 +283,12 @@
>  	        CUPS_LLCAST bc_bytes);
>          cupsBackChannelWrite(bc_buffer, bc_bytes, 1.0);
>        }
> +      else if (bc_bytes < 0 && errno != EAGAIN && errno != EINTR)

So this doesn't check for EOF at all (which would be bc_bytes == 0),
but for an error condition. Maybe it could do both, just to be on the
safe side? (log a different error for the EOF case, of course, since
errno will be 0).

So unfortunately I can't say whether this fixes it as well. I'll reply
back once I get an update from the Debian bug reportes.

Thanks,

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.cups.org/pipermail/cups-devel/attachments/20081116/915c66fd/attachment.sig>


More information about the cups-devel mailing list