mirror of
https://github.com/PowerShell/Win32-OpenSSH.git
synced 2025-07-21 21:14:51 +02:00
improved sshd child monitor code to avoid annoying "broken pipe" msg from Linux clients
take child detection handle out from select mux after a child process is detected to have exited so that other code exit handlings can run its course
This commit is contained in:
parent
1915208a54
commit
989b8a9f01
@ -1994,6 +1994,13 @@ int WSHELPAddChildToWatch ( HANDLE processtowatch)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int WSHELPDelChildToWatch ( HANDLE processtowatch)
|
||||||
|
{
|
||||||
|
if ( ChildToWatch == processtowatch )
|
||||||
|
ChildToWatch = NULL ;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int WSHELPselect(int fds, fd_set* readsfds, fd_set* writesfds,
|
int WSHELPselect(int fds, fd_set* readsfds, fd_set* writesfds,
|
||||||
fd_set* exceptsfds, const struct timeval* timeout)
|
fd_set* exceptsfds, const struct timeval* timeout)
|
||||||
{
|
{
|
||||||
|
@ -879,6 +879,8 @@ collect_children(void)
|
|||||||
session_close_by_pid(s->pid, status);
|
session_close_by_pid(s->pid, status);
|
||||||
|
|
||||||
CloseHandle(process);
|
CloseHandle(process);
|
||||||
|
int WSHELPDelChildToWatch (HANDLE processtowatch);
|
||||||
|
WSHELPDelChildToWatch (process); // take the process off from watch list in select mux
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (i > 0);
|
} while (i > 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user