storing return value of write, may want to use in the future. this gets rid of warning.

This commit is contained in:
Arthur Dene Ice 2014-05-05 14:04:22 -07:00
parent 4cb3529161
commit 6effe033d6

View File

@ -244,13 +244,13 @@ ProcLauncher::ProcRef ProcLauncher::Launch(Spec *&to_launch) {
if(dup2(outfd, STDOUT_FILENO) == -1) {
fprintf(stderr, "Unable to duplicate FD %d to %d. Log file will be empty: %s\n", outfd, STDOUT_FILENO, strerror(errno));
const char *err = "Unable to redirect stdout into this file. That sucks.";
write(outfd, err, strlen(err));
auto writeSize = write(outfd, err, strlen(err));
}
close(STDERR_FILENO);
if(dup2(outfd, STDERR_FILENO) == -1) {
//can no longer print to screen..
const char *err = "Unable to redirect stderr into this file. You might miss some error info in this log.";
write(outfd, err, strlen(err));
auto writeSize = write(outfd, err, strlen(err));
}
close(STDIN_FILENO);