Fixed: Regression in command exit code (https://github.com/PowerShell/Win32-OpenSSH/issues/485)
This commit is contained in:
parent
c6b57c018c
commit
fb51120093
|
@ -208,6 +208,9 @@ int waitpid(int pid, int *status, int options) {
|
|||
if (children.num_zombies) {
|
||||
/* return one of them */
|
||||
ret_id = children.process_id[children.num_children - 1];
|
||||
GetExitCodeProcess(children.handles[children.num_children - 1], &exit_code);
|
||||
if (status)
|
||||
*status = exit_code;
|
||||
sw_remove_child_at_index(children.num_children - 1);
|
||||
return ret_id;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue