[EMAIL PROTECTED] 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 "[EMAIL PROTECTED]"