Re: Creating Compressed Loop FS from stdin
From: ari edelkind (edelkind-freebsd-hackers_at_episec.com)
Date: 12/30/04
- Previous message: Peter Pentchev: "Re: Creating Compressed Loop FS from stdin"
- In reply to: Peter Pentchev: "Re: Creating Compressed Loop FS from stdin"
- Next in thread: Maxim Sobolev: "Re: Creating Compressed Loop FS from stdin"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 30 Dec 2004 09:23:56 -0500 To: freebsd-hackers@FreeBSD.ORG
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
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
- Previous message: Peter Pentchev: "Re: Creating Compressed Loop FS from stdin"
- In reply to: Peter Pentchev: "Re: Creating Compressed Loop FS from stdin"
- Next in thread: Maxim Sobolev: "Re: Creating Compressed Loop FS from stdin"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|