Branch: Tag:

1997-03-20

1997-03-20 16:05:49 by Wilhelm Köhler <wk@cs.tu-berlin.de>

Applied WK's patch

Rev: src/modules/Pipe/pipe.c:1.5

20:   #include <fcntl.h>      #include "global.h" - RCSID("$Id: pipe.c,v 1.4 1997/03/17 03:09:45 hubbe Exp $"); + RCSID("$Id: pipe.c,v 1.5 1997/03/20 16:05:49 grubba Exp $");      #include "stralloc.h"   #include "types.h"
697:    && S_ISREG(s.st_mode)    && (THIS->fd=dup(fd))!=-1 )    { +  /* keep the file pointer of the duped fd */ +  THIS->pos=lseek(fd, 0L, SEEK_CUR); +    #if 0    /* This won't work if the spider-module is dynamically linked. */    push_int(THIS->fd);
720:    }    THIS->lastbuffer=NULL;    -  THIS->pos=0; +  /* keep the file pointer of the duped fd +  THIS->pos=0; */    push_int(0);    apply(sp[-args-2].u.object,"set_id", 1);    pop_n_elems(args+2); /* ... and from apply x 2 */
758:    }       o->mode=O_RUN; -  o->pos=0; +  /* keep the file pointer of the duped fd +  o->pos=0; */ +  o->pos=THIS->pos;       push_object(obj);    obj->refs++;