add exit status return to Windows server

pull/614/head
JacobBarthelmeh 2023-11-01 09:58:23 -06:00
parent fda22526e2
commit f41e706825
1 changed files with 6 additions and 0 deletions

View File

@ -1140,6 +1140,12 @@ static int SHELL_Subsystem(WOLFSSHD_CONNECTION* conn, WOLFSSH* ssh,
HeapFree(GetProcessHeap(), 0, ext.lpAttributeList);
}
if (wolfSSH_SendExitStatus(ssh, processState) !=
WS_SUCCESS) {
wolfSSH_Log(WS_LOG_ERROR, "[SSHD] Issue sending childs exit "
"status");
}
ClosePseudoConsole(pCon);
CloseHandle(processInfo.hThread);
CloseHandle(wolfSSHD_GetAuthToken(conn->auth));