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.17 1998/04/03 20:06:48 grubba Exp $"); + RCSID("$Id: pipe.c,v 1.18 1998/04/03 20:55:47 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:439:    free_string(b->s);    free((char *)b);       /* Wake up first input if it was sleeping and we    * have room for more in the buffer.    */    if (this->sleeping &&    this->firstinput &&    this->bytes_in_buffer<MAX_BYTES_IN_BUFFER)    { -  if (this->type == I_BLOCKING_OBJ) { +  if (this->firstinput->type == I_BLOCKING_OBJ) {    push_int(8192);    push_int(1); /* We don't care if we don't get all 8192 bytes. */ -  apply(i->u.obj, "read", 2); +  apply(i->firstinput->u.obj, "read", 2);    if (sp[-1].type == T_STRING) {    append_buffer(sp[-1].u.string);    } else {    /* FIXME: Should probably check the return value. */    /* EOF */ -  +  this->sleeping = 0;    input_finish();    }    pop_stack();    } else {    this->sleeping=0;    push_callback(offset_input_read_callback);    push_int(0);    push_callback(offset_input_close_callback);    apply(this->firstinput->u.obj, "set_nonblocking", 3);    pop_stack();
pike.git/src/modules/Pipe/pipe.c:680: Inside #if defined(HAVE_MMAP) && defined(HAVE_MUNMAP), #if defined(HAVE_MADVISE), #if defined(HAVE_GETEUID) and #if defined(HAVE_SETREUID)
  #ifdef HAVE_SETREUID    setresuid(-1, 0, -1);   #endif /* HAVE_SETRESUID */   #endif /* HAVE_SETEUID */    }   #endif    madvise(m, s.st_size, MADV_SEQUENTIAL);   #ifdef HAVE_GETEUID    if(ou) {   #ifdef HAVE_SETEUID -  seteuid(0); +  seteuid(ou);   #else /* ! HAVE_SETEUID */   #ifdef HAVE_SETREUID    setresuid(-1, ou, -1);   #endif /* HAVE_SETRESUID */   #endif /* HAVE_SETEUID */    }   #endif   #endif    pop_n_elems(args);    push_int(0);