Date: Thu, 30 Dec 2004 09:23:56 -0500 From: ari edelkind <edelkind-freebsd-hackers@episec.com> To: freebsd-hackers@FreeBSD.ORG Subject: Re: Creating Compressed Loop FS from stdin Message-ID: <20041230142356.GQ3608@episec.com> In-Reply-To: <20041230140007.GH830@straylight.m.ringlet.net> References: <1104358540.2895.10.camel@kaiser.sig11.org> <20041230103433.GB830@straylight.m.ringlet.net> <1104409708.6657.1.camel@kaiser.sig11.org> <20041230123116.GE830@straylight.m.ringlet.net> <41D4036B.1060600@portaone.com> <20041230140007.GH830@straylight.m.ringlet.net>
next in thread | previous in thread | raw e-mail | index | archive | help
roam@ringlet.net wrote: > > It will not help, since AFAIK you can't seek stdin anyway, or even if I > > am wrong and you can seek it to the end you will be unable to seek it > > backward. > > I tested the patch before posting it, fully expecting to find that stdin > really cannot be seeked (sought? :), and surprisingly it worked, at least > on RELENG_5 as of today! You can always seek stdin, if stdin happens to be associated with a seekable descriptor. It isn't given any special treatment simply because it has a vector of 0. That is, if you use something along the lines of: % ./seekme </etc/services then /etc/services is associated with descriptor 0, and you can seek all you like. If you use % cat /etc/services |./seekme ... then the descriptor isn't associated with a file, and you'll run into problems. ari
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041230142356.GQ3608>