mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-07 10:01:14 -03:00
Mark stdin as nonblocking if we get EWOULDBLOCK, and before handing it off to child processes when either starting them or moving them to the foreground.
https://github.com/fish-shell/fish-shell/issues/176
This commit is contained in:
@@ -135,7 +135,7 @@ static int try_get_socket_once(void)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((fcntl(s, F_SETFL, O_NONBLOCK) != 0) || (fcntl(s, F_SETFD, FD_CLOEXEC) != 0))
|
||||
if ((make_fd_nonblocking(s) != 0) || (fcntl(s, F_SETFD, FD_CLOEXEC) != 0))
|
||||
{
|
||||
wperror(L"fcntl");
|
||||
close(s);
|
||||
|
||||
Reference in New Issue
Block a user