Skip to content

Commit fd580e9

Browse files
authored
Allow remote session processes to break away from session job object
PowerShell/Win32-OpenSSH#1032 Issue: Ssh-shellhost.exe creates a job object and ties all its child processes to its lifetime. It does not allow the child processes to break away from this job. This restriction is unnecessary. Fix: Modified job object to allow child processes to break away if they need to.
1 parent b92b7c9 commit fd580e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/win32/win32compat/shell-host.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1790,7 +1790,7 @@ wmain(int ac, wchar_t **av)
17901790
}
17911791

17921792
memset(&job_info, 0, sizeof(JOBOBJECT_EXTENDED_LIMIT_INFORMATION));
1793-
job_info.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE;
1793+
job_info.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE | JOB_OBJECT_LIMIT_BREAKAWAY_OK;
17941794

17951795
if (!SetInformationJobObject(job, JobObjectExtendedLimitInformation, &job_info, sizeof(job_info)) ||
17961796
!AssignProcessToJobObject(job, GetCurrentProcess())) {

0 commit comments

Comments
 (0)