Skip to content
  • Tamar Christina's avatar
    efc4a166
    Allow timeout to kill entire process tree. · efc4a166
    Tamar Christina authored
    Summary:
    we spawn the child processes with handle inheritance on. So they inherit the std handles.
    The problem is that the job handle gets inherited too.
    So the `JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE` doesn't get used since there are
    open handles to the job in the children.
    
    We then terminate the top level process which is `sh` but leaves the children around.
    
    This explicitly disallows the inheritance of the job and events handle.
    
    Test Plan: ./validate
    
    Reviewers: austin, bgamari
    
    Reviewed By: bgamari
    
    Subscribers: thomie, #ghc_windows_task_force
    
    Differential Revision: https://phabricator.haskell.org/D2895
    
    GHC Trac Issues: #13004
    efc4a166
    Allow timeout to kill entire process tree.
    Tamar Christina authored
    Summary:
    we spawn the child processes with handle inheritance on. So they inherit the std handles.
    The problem is that the job handle gets inherited too.
    So the `JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE` doesn't get used since there are
    open handles to the job in the children.
    
    We then terminate the top level process which is `sh` but leaves the children around.
    
    This explicitly disallows the inheritance of the job and events handle.
    
    Test Plan: ./validate
    
    Reviewers: austin, bgamari
    
    Reviewed By: bgamari
    
    Subscribers: thomie, #ghc_windows_task_force
    
    Differential Revision: https://phabricator.haskell.org/D2895
    
    GHC Trac Issues: #13004
Loading