Re: Proper way to use an updating FILE on a tty?

2017-10-10 Thread Nick Stoughton
XBD 3.172 defines a File Offset: 3.172 File Offset The byte position in the file where the next I/O operation begins. Each open file description associated with a regular file, block special file, or directory has a file offset. A character special file that does not refer to a terminal device may

Proper way to use an updating FILE on a tty?

2017-10-10 Thread Schwarz, Konrad
POSIX FILE streams opened for update need either a fflush() or a file positioning function when switching from writing to reading, and a file positioning function when switching from reading to writing. The Newlib C library as used in Cygwin fails with perror() reporting "Illegal seek" when fsee