On 02/15/2010 03:19 AM, Tim Moore wrote:

> Some of
> the grossness is due to a hack which lets a file be treated as an infinitely
> repeating stream of bytes, very convenient for demos at SIGGRAPH. Your patch
> breaks that hack. I won't argue too strongly that the hack belongs in
> SGFile, but I want to have some story for replacing it, possibly in
> FGGeneric::process(), before we blow it away.

Please try this story:

   mkfifo /tmp/pipe.flog
   sleep 1000000 > /tmp/pipe.flog &
   while true ; do cat bytes > /tmp/pipe.flog ; done & 
   fgfs --generic=file,in,$rate,/tmp/pipe.flog,$protocol

Now that readline does not do seeks, it can read named
pipes (FIFOs) just fine, and this opens up all sorts of
non-hackish way of solving the SIGGRAPH problem ... and
a host of previously-unsolved problems as well.  For
example, it allows you to switch from one stream of
bytes to another without restarting fgfs.

Seems like a win/win to me.

If this story is not good enough, please clarify the
question.

============

Hint:  The sleep statement ensures that the reader (fgfs)
will not see an EoF at the point where one cat of bytes
ends and the next begins.

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to