what is an "update stream"?

C

chandanlinster

When I was reading the man-page of fflush, I came across this statement
---

"The function fflush forces a write of all user-space buffered data for
the given output or update stream via the stream's underlying write
function."

what exactly is an "update stream"?
 
S

Stephen Sprunk

chandanlinster said:
When I was reading the man-page of fflush, I came across this
statement
---

"The function fflush forces a write of all user-space buffered data
for
the given output or update stream via the stream's underlying write
function."

what exactly is an "update stream"?

In my man page, the first "stream" is underlined, meaning it refers to
the argument "stream" in the prototype. i.e. fflush() only affects the
stream you pass to it, not all streams.

It could definitely be clearer.

S
 
K

Keith Thompson

chandanlinster said:
When I was reading the man-page of fflush, I came across this statement
---

"The function fflush forces a write of all user-space buffered data for
the given output or update stream via the stream's underlying write
function."

what exactly is an "update stream"?

An update stream is a stream opened for updating (i.e., for reading
and writing). This is controlled by the mode argument to fopen();
modes "r+", "w+", and "a+" create update streams.
 
K

Keith Thompson

Stephen Sprunk said:
In my man page, the first "stream" is underlined, meaning it refers to
the argument "stream" in the prototype. i.e. fflush() only affects
the stream you pass to it, not all streams.

I don't think that answers the question. See my other response.
 
C

chandanlinster

Thanks everybody for providing the solutions.
Merry Christmas and A happy new year.
 
B

Barry Schwarz

When I was reading the man-page of fflush, I came across this statement
---

"The function fflush forces a write of all user-space buffered data for
the given output or update stream via the stream's underlying write
function."

what exactly is an "update stream"?

An update stream is one that has been opened for update, specifically
if the mode argument in the call to fopen contains a '+' (r+, rb+, a+,
etc).


Remove del for email
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top