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

version» Context lines:

pike.git/src/modules/Pipe/pipe.c:15: Inside #if defined(HAVE_MMAP)
  #ifdef HAVE_MMAP   /* sys/mman.h is _probably_ there anyway. */   #include <sys/mman.h>   #endif   #endif   #endif      #include <fcntl.h>      #include "global.h" - RCSID("$Id: pipe.c,v 1.19 1998/04/03 21:35:34 grubba Exp $"); + RCSID("$Id: pipe.c,v 1.20 1998/04/06 20:40:04 hubbe 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:332:   /* Read some data from the blocking object.    *    */   static int read_some_data(void)   {    struct pipe *this = THIS;    struct input * i = this->firstinput;       if (!i || i->type != I_BLOCKING_OBJ) {    fatal("PIPE: read_some_data(): Bad input type!\n"); -  return; +  return -1;    }    push_int(8192);    push_int(1); /* We don't care if we don't get all 8192 bytes. */    apply(i->u.obj, "read", 2);    if ((sp[-1].type == T_STRING) && (sp[-1].u.string->len > 0)) {    append_buffer(sp[-1].u.string);    pop_stack();    THIS->sleeping = 1;    return(1); /* Success */    }