mirror of
https://github.com/PowerShell/Win32-OpenSSH.git
synced 2025-07-23 22:15:37 +02:00
Delete unwanted code in session cleanup
This commit is contained in:
parent
2679669da6
commit
eb9db70558
22
session.c
22
session.c
@ -2882,28 +2882,6 @@ session_pty_cleanup2(Session *s)
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
kill(s->pid, SIGTERM);
|
kill(s->pid, SIGTERM);
|
||||||
|
|
||||||
/*
|
|
||||||
* Try wait 100 ms until child finished.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (WaitForSingleObject(s -> pid, 100) == WAIT_TIMEOUT)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* If still not closed, kill 'cmd.exe' process.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (TerminateProcess(s -> pid, 1) == TRUE)
|
|
||||||
{
|
|
||||||
debug("Process %u terminated.", s -> pid);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
debug("ERROR. Cannot terminate %u process.", s -> pid);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
CloseHandle(s -> pid);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user