pike.git / src / modules / Pipe / pipe.c

version» Context lines:

pike.git/src/modules/Pipe/pipe.c:19: Inside #if defined(HAVE_MMAP)
  #else   #ifdef HAVE_MMAP   /* sys/mman.h is _probably_ there anyway. */   #include <sys/mman.h>   #endif   #endif   #endif      #include <fcntl.h>    - RCSID("$Id: pipe.c,v 1.26 1998/07/22 18:01:12 grubba Exp $"); + RCSID("$Id: pipe.c,v 1.27 1998/07/22 18:03:00 grubba Exp $");      #include "threads.h"   #include "stralloc.h"   #include "pike_macros.h"   #include "object.h"   #include "constants.h"   #include "interpret.h"   #include "svalue.h"   #include "error.h"   #include "builtin_functions.h"
pike.git/src/modules/Pipe/pipe.c:454:    do {    THREADS_ALLOW();    len = read(this->fd, buffer, len);    THREADS_DISALLOW();    if (len < 0) {    if (errno != EINTR) {    return(NULL);    }    }    } while(len < 0); +  /* +  * FIXME: What if len is 0? +  */    return make_shared_binary_string(buffer,len);    }       if (pos<this->pos)    return make_shared_string("buffer underflow"); /* shit */       /* We want something in the next buffer */    while (this->firstbuffer && pos>=this->pos+this->firstbuffer->s->len)    {    /* Free the first buffer, and update THIS->pos */