ridiculousfish 2018-09-05 21:48:32 -07:00
parent 06e5194092
commit ca61fc1bf8
2 changed files with 5 additions and 10 deletions

View file

@ -2010,11 +2010,8 @@ void convert_wide_array_to_narrow(const null_terminated_array_t<wchar_t> &wide_a
void autoclose_fd_t::close() {
if (fd_ < 0) return;
while (::close(fd_) == -1) {
if (errno != EINTR) {
if (::close(fd_) == -1) {
wperror(L"close");
break;
}
}
fd_ = -1;
}

View file

@ -73,13 +73,11 @@ void exec_close(int fd) {
}
while (close(fd) == -1) {
if (errno != EINTR) {
debug(1, FD_ERROR, fd);
wperror(L"close");
break;
}
}
}
int exec_pipe(int fd[2]) {
ASSERT_IS_MAIN_THREAD();