Skip to content

Commit

Permalink
Fixing SIGCHLD logic in sftp and removing double close in SIGCHLD imp…
Browse files Browse the repository at this point in the history
…lementation
  • Loading branch information
manojampalam committed Apr 6, 2016
1 parent 6ec6275 commit a9a683e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contrib/win32/win32compat/signal_sigchld.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion sftp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit a9a683e

Please sign in to comment.