mirror of
https://github.com/PowerShell/Win32-OpenSSH.git
synced 2025-07-20 12:34:45 +02:00
Fixes in sshd
This commit is contained in:
parent
090c14b6e3
commit
0861b4ea3a
@ -184,7 +184,7 @@ sw_process_pending_signals() {
|
||||
BOOL sig_int = FALSE; /* has any signal actually interrupted */
|
||||
|
||||
debug3("process_signals()");
|
||||
int i, exp[] = { W32_SIGCHLD , W32_SIGINT , W32_SIGALRM };
|
||||
int i, exp[] = { W32_SIGCHLD , W32_SIGINT , W32_SIGALRM, W32_SIGTERM, W32_SIGTSTP };
|
||||
|
||||
/* check for expected signals*/
|
||||
for (i = 0; i < (sizeof(exp) / sizeof(exp[0])); i++)
|
||||
|
5
sshd.c
5
sshd.c
@ -380,7 +380,6 @@ static void do_ssh2_kex(void);
|
||||
|
||||
SetServiceStatus( gSvcStatusHandle, &gSvcStatus );
|
||||
}
|
||||
|
||||
static VOID WINAPI SSHDHandlerEx(DWORD dwControl)
|
||||
{
|
||||
debug("Request received (%u)", dwControl);
|
||||
@ -397,8 +396,7 @@ static void do_ssh2_kex(void);
|
||||
|
||||
ReportSvcStatus(SERVICE_STOP_PENDING, NO_ERROR, 500);
|
||||
|
||||
raise(SIGINT);
|
||||
/*TODO - wait for main thread to unwind */
|
||||
GenerateConsoleCtrlEvent(CTRL_BREAK_EVENT, 0);
|
||||
ReportSvcStatus(SERVICE_STOPPED, NO_ERROR, 0);
|
||||
|
||||
return;
|
||||
@ -1614,7 +1612,6 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s)
|
||||
|
||||
sw_add_child(pi.hProcess, pi.dwProcessId);
|
||||
CloseHandle(pi.hThread);
|
||||
CloseHandle(pi.hProcess);
|
||||
pid = pi.dwProcessId;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user