Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Apr 1995 17:54:29 -0400 (EDT)
From:      Richard Toren <rpt@miles.sso.loral.com>
To:        hackers@FreeBSD.org
Subject:   aspfilter & stdin
Message-ID:  <Pine.SUN.3.91.950416174558.11362A-100000@miles>

next in thread | raw e-mail | index | archive | help
I have modified the 'rewindstdin.c' as:

   #include <stdio.h>
   #include <unistd.h>

   main()
   {
     return lseek(0,0L,SEEK_SET) < 0; 
   }

Giving the following results:
   <src/rewind-stdin># make
   cc -s -O -o rewindstdin rewindstdin.c
   <src/rewind-stdin># cat rewindstdin.c | (file -; ./rewindstdin ;file -) 
   standard input:              c program text
   standard input:              empty

I thought about the possibility that the stdin redirection would be a pipe,
and tried with a small file (<512 bytes) with the same results.

?? why the '< 0' of the return code??
 
Stuck....


                         ====================================================
Rip Toren               | The bad news is that C++ is not an object-oriented |
rpt@miles.sso.loral.com | programming language. .... The good news is that   |
                        | C++ supports object-oriented programming.          |
                        |    C++ Programming & Fundamental Concepts          |
                        |     by Anderson & Heinze                           |
                         ====================================================



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SUN.3.91.950416174558.11362A-100000>