write(2)에 대한 함수 정의 보는 법

> man 2 write

synopsis : ssize_t write(int fildes, const void* buffer, size_t count)

 

 

On success, the number of bytes written are returned (zero indicates nothing was written). 

 

* reference

stackoverflow.com/questions/5656628/what-should-i-do-when-writefd-buf-count-returns-0

 

 

What should I do when write(fd, buf, count) returns 0?

Possible Duplicate: Is a return value of 0 from write(2) in C an error? Assuming that count > 0 : ret = write(fd, buf, count); if(ret == 0) { // Should I try to write again // or ...

stackoverflow.com

 

 

stackoverflow.com/questions/2176443/is-a-return-value-of-0-from-write2-in-c-an-error

 

Is a return value of 0 from write(2) in C an error?

In the man page for the system call write(2) - ssize_t write(int fd, const void *buf, size_t count); it says the following: Return Value On success, the number of bytes written are re...

stackoverflow.com

 

 

'다전공_컴퓨터공학 > 시스템프로그래밍, 운영체제' 카테고리의 다른 글

[SP] sleep  (0) 2020.12.01
[SP] async-signal safe  (0) 2020.12.01
[SP] C 컴파일, 링크  (0) 2020.10.14
[SP] makeargv  (0) 2020.10.14
[SP] 우분투(Ubuntu)에서 윈도우(Windows) 파일 전송  (0) 2020.10.06

+ Recent posts