Skip to contentSkip to conversation

fflush.3: SEE ALSO: Add fpurge(3)

PATCH In review Alejandro Colomar 2 participants 3 messages Feb 23, 2021 – Mar 4, 2021 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fflush.3: SEE ALSO: Add fpurge(3)

fpurge(i_stream) does the same as fflush(i_stream), AFAIK.

---
 man3/fflush.3 | 1 +
 1 file changed, 1 insertion(+)
man3/fflush.3 +1 -0
index 26b91e618..bbe3c453e 100644
@@ -133,6 +133,7 @@ or
 .BR sync (2),
 .BR write (2),
 .BR fclose (3),
+.BR fpurge (3),
 .BR fileno (3),
 .BR fopen (3),
 .BR setbuf (3),
Signature · 1 line
2.30.1.721.g45526154a5
#1 lore raw

Hello Alex,

Quoted 1 line · Alejandro Colomar

fpurge(i_stream) does the same as fflush(i_stream), AFAIK.

I don''t think so. fflush() of an output stream forces a write() of data to the kernel. fpurge() discards the data, as I understand things.

But I still think the patch is useful. fflush(3)
and fpurge(3) serve related purposes.

Patch applied.

Thanks,

Michael

Quoted 18 lines
---
 man3/fflush.3 | 1 +
 1 file changed, 1 insertion(+)
man3/fflush.3 +1 -0
index 26b91e618..bbe3c453e 100644
@@ -133,6 +133,7 @@ or
 .BR sync (2),
 .BR write (2),
 .BR fclose (3),
+.BR fpurge (3),
 .BR fileno (3),
 .BR fopen (3),
 .BR setbuf (3),
Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
#2 lore raw

Hello Michael,

Quoted 8 lines · Michael Kerrisk (man-pages)

Hello Alex,

Quoted 1 line · Alejandro Colomar

fpurge(i_stream) does the same as fflush(i_stream), AFAIK.

I don''t think so. fflush() of an output stream forces a write() of data to the kernel. fpurge() discards the data, as I understand things.

Yes, for output streams they're different.
I meant
f.....(i[nput]_stream);
which I believe to be the same thing.

Quoted 5 lines

But I still think the patch is useful. fflush(3) and fpurge(3) serve related purposes.

Patch applied.

Thanks,

Alex

Signature · 3 lines
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/