read() and write() return ssize_t, not size_t.

rv < 0 error checks were always false.
This commit is contained in:
Ben Noordhuis 2011-07-08 00:35:33 +02:00
parent a74f339d17
commit 1717d42165

View File

@ -248,7 +248,7 @@ int process_copy_output(process_info_t *p, int fd) {
return -1;
}
size_t nread, nwritten;
ssize_t nread, nwritten;
char buf[1024];
while ((nread = read(fileno(p->stdout_file), buf, 1024)) > 0) {