[net.lang.c] filter i/o in C

goutal (01/26/83)

Most implementations of C that I know of
prohibit me from having the same file open for reading and writing
at the same time.  Most operating systems that I use, however,
think this is okay, under various interpretations.
The most obvious example of why I might want to do this is a simple
filter or, more clearly, an editor of some sort;
I want to read from a file and write the result back into the same
file (or a new version of it, more likely).
Anybody know how I should do this?
Just mail to me, I guess.
-- Kenn (decvax!)goutal

norskog (01/27/83)

#R:decvax:-40500:fortune:16200002:000:184
fortune!norskog    Jan 26 14:46:00 1983

Be precise!
You mean that most implementations of buffered I/O don't
allow simultaneous read/write access.
read() and write() under just about any real UN*X system don't give a damn.

bcase (01/28/83)

#R:decvax:-40500:uiucdcs:27600006:000:155
uiucdcs!bcase    Jan 27 22:08:00 1983

What?  The C language says NOTHING about I/O!  You are referring to an
operating system consideration.  And to address that point, UN*X lets
you do it....