728x90

#include <stdio.h>

int fflush (FILE *stream);


return value : 

success : 0

fail : EOF


user buffer에 있는 내용을 kernel buffer에 write한다.

fwrite대신 강제로 write를 하는 것과 비슷함.
실제로 file-system에 기록되는지는 보장하지 못함.

그래서 보통 fflush() 다음에 fsync()를 같이 사용한다.




#include <stdio.h>

int fileno (FILE *stream);


return value : 

success : fd

fail : -1(EBADF)


728x90

'Programming > linux왕초보' 카테고리의 다른 글

Caching your GitHub password in Git  (0) 2016.01.08
Serial ports usage on Linux  (0) 2016.01.08
process 종료  (0) 2015.05.28
fork  (0) 2015.05.26
Linux SSD 최적화  (0) 2015.04.17
[Linux] stream write  (0) 2015.03.26
linux filesystem 사용 용량 확인  (0) 2015.03.18
[Linux] Select and Poll  (0) 2015.01.27
Example syntax for Secure Copy (scp) : scp사용법  (0) 2014.04.02
tar 분할압축/풀기  (0) 2014.03.20

+ Recent posts