From owner-freebsd-hackers Sun Apr 16 14:35:18 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id OAA15218 for hackers-outgoing; Sun, 16 Apr 1995 14:35:18 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id OAA15212 for ; Sun, 16 Apr 1995 14:35:07 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id HAA17611; Mon, 17 Apr 1995 07:31:03 +1000 Date: Mon, 17 Apr 1995 07:31:03 +1000 From: Bruce Evans Message-Id: <199504162131.HAA17611@godzilla.zeta.org.au> To: j@uriah.heep.sax.de, rpt@miles.sso.loral.com Subject: Re: aspfilter & stdin Cc: andreas@knobel.gun.de, hackers@FreeBSD.org Sender: hackers-owner@FreeBSD.org Precedence: bulk >[trying to get apsfilter to work on FreeBSD] >> ... A companion program is supplied called 'rewindstdin'. >> >> main() >> { >> return lseek(0,0L,0) < 0; >> } >I've already wondered how this should work on a pipe after Andreas >described it to me on the phone. I'd suggest you to contact Andreas It must fail on pipes and set errno to ESPIPE. I'm currently looking at a bug involving lseek() not failing on named pipes. Ordinary pipes are handled correctly in vfs_syscalls.c:lseek() because fp->f_type is DTYPE_SOCKET for them. For named pipes, fp->f_type is DTYPE_VNODE (this seems appropriate because there really is a vnode) so lseek() does the wrong thing. There are probably other places where named pipes should be handled like ordinary pipes (mostly in kern_descrip.c). File timestamps are broken for both ordinary pipes and named pipes. Bruce