cupsRasterReadPixels doesn't handle EAGAIN correctly #473

Closed
michaelrsweet opened this Issue Dec 10, 2003 · 3 comments

Comments

Projects
None yet
1 participant
Collaborator

michaelrsweet commented Dec 10, 2003

Version: 1.1-current
CUPS.org User: jlovell

In cupsRasterReadPixels errno should not be consulted when read(2) returns 0. The attached patch fixes it.

Collaborator

michaelrsweet commented Dec 11, 2003

CUPS.org User: mike

Reassigned to 1.2, and will apply.

Collaborator

michaelrsweet commented Feb 3, 2004

CUPS.org User: mike

Fixed in CVS - the anonymous CVS repository will be updated at midnight EST.

Collaborator

michaelrsweet commented Feb 3, 2004

"raster.c.patch":

��raster.c.patch����������������������������������������������������������������������u����»üêA»üêB���mBIN�������������������e��Index: raster.c

RCS file: /home/anoncvs/cups/filter/raster.c,v
retrieving revision 1.5
diff -u -d -b -w -r1.5 raster.c
--- raster.c 17 Dec 2002 18:59:28 -0000 1.5
+++ raster.c 10 Dec 2003 23:20:48 -0000
@@ -178,12 +178,15 @@
{
bytes = read(r->fd, p, remaining);

  • if (bytes <= 0)

  • {

  •  if (errno != EAGAIN && errno != EINTR)
    
  • if (bytes == 0)
    return (0);

  •  else
    
  • if (bytes < 0)

  • {

  •  if (errno == EAGAIN || errno == EINTR)
     continue;
    
  •  else
    
  •    return (0);
    

    }

    remaining -= bytes;
    �����������

michaelrsweet added this to the Stable milestone Mar 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment