This project is mirrored from https://github.com/haskell/process. Pull mirroring updated .
  1. 04 Feb, 2020 1 commit
    • Ben Gamari's avatar
      Refactor waiting on job objects · 3138b775
      Ben Gamari authored
      Previously in order to wait on a job object we would create an IO
      Completion Port, configure the job object to emit notifications to it
      with SetInformationJobObject, and wait for JOB_OBJECT_MSG_EXIT_PROCESS
      notifications until all processes have died.
      
      This followed one piece of guidance from Microsoft [1] but according to
      Microsoft's own documentation, this cannot work reliably as delivery of
      job notifications is not guaranteed [2]. I have seen cases where the
      processes hang waiting on job objects so I can only guess that message
      loss is indeed possible.
      
      Instead we now take a simpler approach: look at the processes in the
      job, if there are none then we are done. If there are still processes,
      choose one and wait for it to finish. Iterate until the job is empty.
      
      Credit for this approach goes to Davean Scies.
      
      [1] https://devblogs.microsoft.com/oldnewthing/20130405-00/?p=4743
      [2] https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-jobobject_associate_completion_port
      3138b775
  2. 03 Feb, 2020 3 commits
  3. 29 Jan, 2020 2 commits
  4. 07 Jan, 2020 2 commits
  5. 19 Nov, 2019 2 commits
  6. 12 Nov, 2019 2 commits
  7. 09 Nov, 2019 2 commits
  8. 05 Nov, 2019 4 commits
  9. 10 Oct, 2019 6 commits
  10. 02 Oct, 2019 2 commits
  11. 27 Sep, 2019 1 commit
  12. 26 Sep, 2019 3 commits
  13. 24 Sep, 2019 1 commit
  14. 16 Sep, 2019 1 commit
  15. 11 Sep, 2019 2 commits
  16. 08 Sep, 2019 1 commit
  17. 06 Sep, 2019 1 commit
  18. 21 Jul, 2019 1 commit
  19. 19 Jul, 2019 1 commit
    • Ben Gamari's avatar
      Call initgroups before setuid · 4db57cb4
      Ben Gamari authored
      Previously we would fail to call initgroups before setuid'ing. This
      meant that our groups we not be reset to reflect those our new user
      belongs to. Fix this.
      4db57cb4
  20. 18 Jul, 2019 1 commit
    • Ben Gamari's avatar
      Fix incorrect case fallthrough · 73ea41b3
      Ben Gamari authored
      The error message lookup logic would fallthrough from the
      forkSetuidFailed case into the default case, meaning that the error
      message of the former would never be returned.
      73ea41b3
  21. 02 Jul, 2019 1 commit