mirror of
https://github.com/PowerShell/Win32-OpenSSH.git
synced 2025-07-21 04:54:48 +02:00
Fixing SIGCHLD logic in sftp and removing double close in SIGCHLD implementation
This commit is contained in:
parent
6ec627589f
commit
a9a683ed3c
@ -192,7 +192,7 @@ int waitpid(int pid, int *status, int options) {
|
||||
|
||||
ret_id = children.process_id[index];
|
||||
GetExitCodeProcess(process, &exit_code);
|
||||
CloseHandle(process);
|
||||
/* process handle will be closed when its removed from list */
|
||||
sw_remove_child_at_index(index);
|
||||
if (status)
|
||||
*status = exit_code;
|
||||
|
2
sftp.c
2
sftp.c
@ -2251,8 +2251,8 @@ connect_to_server(char *path, char **args, int *in, int *out)
|
||||
NORMAL_PRIORITY_CLASS, NULL,
|
||||
NULL, &si, &pi) == TRUE) {
|
||||
sshpid = pi.dwProcessId;
|
||||
CloseHandle(pi.hProcess);
|
||||
CloseHandle(pi.hThread);
|
||||
sw_add_child(pi.hProcess, pi.dwProcessId);
|
||||
}
|
||||
else
|
||||
errno = GetLastError();
|
||||
|
Loading…
x
Reference in New Issue
Block a user