Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Apr 1995 07:31:03 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        j@uriah.heep.sax.de, rpt@miles.sso.loral.com
Cc:        andreas@knobel.gun.de, hackers@FreeBSD.org
Subject:   Re: aspfilter & stdin
Message-ID:  <199504162131.HAA17611@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>[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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199504162131.HAA17611>