While spawning sshd process, use DETACHED_PROCESS flag

This commit is contained in:
bagajjal 2019-12-09 11:51:24 -08:00 committed by GitHub
parent 25588ffb7a
commit 9b327de3e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -1069,6 +1069,10 @@ spawn_child_internal(char* cmd, char *const argv[], HANDLE in, HANDLE out, HANDL
si.dwFlags = STARTF_USESTDHANDLES;
flags |= CREATE_NO_WINDOW;
if (strstr(cmd, "sshd.exe")) {
flags |= DETACHED_PROCESS;
}
wchar_t * t = cmdline_utf16;
do {
debug3("spawning %ls", t);