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.15 1998/04/03 20:23:00 grubba Exp $"); + RCSID("$Id: pipe.c,v 1.16 1998/04/03 20:56: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:351:    push_callback(offset_input_close_callback);    apply_low(i->u.obj,i->set_nonblocking_offset,3);    pop_stack();    return;       case 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);    if (sp[-1].type == T_STRING) { +  write(2, "PIPE:input_finish(): Read:\"", 27); +  write(2, sp[-1].u.string->str, sp[-1].u.string->len); /***********/ +  write(2, "\"\n", 2);    append_buffer(sp[-1].u.string);    pop_stack();    THIS->sleeping = 1;    return;    } else {    /* FIXME: Should we check the return value here? */ -  +  write(2, "PIPE:input_finish(): EOF!\n", 26); /***********/    pop_stack();    /* EOF */    continue;    }       case I_MMAP:    if (THIS->fd==-1) return;    continue;       case I_STRING:
pike.git/src/modules/Pipe/pipe.c:441:    */    if (this->sleeping &&    this->firstinput &&    this->bytes_in_buffer<MAX_BYTES_IN_BUFFER)    {    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(this->firstinput->u.obj, "read", 2);    if (sp[-1].type == T_STRING) { +  write(2, "PIPE:gimme_more_data(): Read:\"", 30); +  write(2, sp[-1].u.string->str, sp[-1].u.string->len); /***********/ +  write(2, "\"\n", 2);    append_buffer(sp[-1].u.string);    } else {    /* FIXME: Should probably check the return value. */    /* EOF */ -  +  write(2, "PIPE:gimme_more_data(): EOF!\n", 29); /***********/ +  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:677: 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);