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

version» Context lines:

pike.git/src/modules/Pipe/pipe.c:13: 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.1 1997/02/11 08:38:08 hubbe Exp $"); + RCSID("$Id: pipe.c,v 1.2 1997/02/20 01:35:52 grubba Exp $");      #include "stralloc.h"   #include "types.h"   #include "macros.h"   #include "object.h"   #include "constants.h"   #include "interpret.h"   #include "svalue.h"   #include "error.h"   
pike.git/src/modules/Pipe/pipe.c:690:    {    /* test if usable as buffer */    apply(sp[-args].u.object,"query_fd",0);       if ((sp[-1].type==T_INT)    && (fd=sp[-1].u.integer)>=0    && (fstat(fd,&s)==0)    && S_ISREG(s.st_mode)    && (THIS->fd=dup(fd))!=-1 )    { + #if 0 +  /* This won't work if the spider-module is dynamically linked. */    push_int(THIS->fd);    push_string(make_shared_string("pipe.c: file buffer"));    f_mark_fd(2);    pop_stack(); -  + #endif /* 0 */       THIS->living_outputs++;       while (THIS->firstbuffer)    {    b=THIS->firstbuffer;    THIS->firstbuffer=b->next;    lseek(THIS->fd,THIS->pos,0);    write(THIS->fd,b->s->str,b->s->len);    sbuffers-=b->s->len;