Fixed the write error check printing under the wrong circumstances

This commit is contained in:
Scoopta 2021-11-10 22:00:50 -08:00
parent 794789e01f
commit 2292d339ce

View File

@ -1281,7 +1281,7 @@ static void do_copy(void) {
} }
close(fds[0]); close(fds[0]);
if (write(fds[1], action, strlen(action)) != 0) { if(write(fds[1], action, strlen(action)) <= 0) {
fprintf(stderr, "fd pipe failed to write\n"); fprintf(stderr, "fd pipe failed to write\n");
} }