This project is mirrored from https://github.com/haskell/process. Pull mirroring updated .
  1. 18 Jan, 2023 1 commit
  2. 17 Jan, 2023 1 commit
    • Cheng Shao's avatar
      Fix a non-existent macro unset by GHC · 16f53442
      Cheng Shao authored
      __wasm__ is a clang builtin macro when targetting wasm32, but GHC
      passes -undef when invoking clang, therefore we can't use it. Use
      wasm32_HOST_ARCH instead, since it's generated by the GHC build
      system.
      16f53442
  3. 09 Jan, 2023 1 commit
  4. 05 Jan, 2023 1 commit
  5. 12 Dec, 2022 3 commits
  6. 08 Dec, 2022 1 commit
  7. 28 Nov, 2022 3 commits
  8. 02 Nov, 2022 1 commit
  9. 01 Nov, 2022 1 commit
    • Ben Gamari's avatar
      testsuite: Don't attempt to read from inherited fd in processT251 · a4d1a80e
      Ben Gamari authored
      It turns out that this test is subtly broken. In particular, the
      test will fail if any file is opened in the subprocess before the child
      is run since the closed fd 0 may be reused for the new file.
      This tends to happen in the threaded RTS due to the event manager's
      control pipe (see GHC #22395). Unfortunately, it's not really clear how
      else #251 can reliably be tested.
      a4d1a80e
  10. 25 Oct, 2022 2 commits
  11. 21 Sep, 2022 1 commit
  12. 20 Sep, 2022 1 commit
  13. 13 Sep, 2022 1 commit
  14. 11 Sep, 2022 1 commit
  15. 04 Aug, 2022 3 commits
    • Ben Gamari's avatar
      Merge pull request #257 from bgamari/wip/T251 · fad8c8da
      Ben Gamari authored
      Fix process#251
      fad8c8da
    • Ben Gamari's avatar
      Add test for process#251 · d5da77d2
      Ben Gamari authored
      d5da77d2
    • Ben Gamari's avatar
      posix_spawn: Don't rely on addclose not failing for closed fds · 314aaf3f
      Ben Gamari authored
      Previously to spawn a process with a closed standard handle, we
      would use `posix_spawn_file_action_addclose`. However, it turns out that
      POSIX specifies that `spawnp()` may fail if `addclose()` is used on an
      fd that is already closed. While glibc and musl appear to ignore this
      aspect of the specification, Darwin indeed follows it leading to #251.
      
      This behavior is rather unfortunate as
      `posix_spawn_file_action_addclose` is a convenient way to close a handle
      in a subprocess in a race-free manner (e.g. unlike `O_CLOEXEC`, which is
      global). To avoid #251 we must first use
      `posix_spawn_file_action_addopen` on the fd (e.g. opening `/dev/null`)
      to be closed to ensure that it is valid, which has the side-effect of
      closing the inherited fd. We can then safely use
      `posix_spawn_file_action_addclose` to close the fd.
      
      Fixes #251.
      314aaf3f
  16. 02 Aug, 2022 3 commits
  17. 15 Jun, 2022 2 commits
  18. 14 Jun, 2022 1 commit
    • Ben Gamari's avatar
      cbits/fork-exec: Don't dup2 identical fds · f5e10c4a
      Ben Gamari authored
      Darwin violates POSIX by making
      `dup2(x,x)`, which should be a no-op, error. Consequently, we must take
      care not to `dup2` in such cases.
      
      We had already made this change in the `posix_spawnp` codepath but I had
      assumed that this *only* affected `posix_spawnp`, not the `dup2` system
      call itself.
      f5e10c4a
  19. 31 May, 2022 1 commit
  20. 29 May, 2022 1 commit
  21. 27 May, 2022 2 commits
  22. 26 May, 2022 1 commit
  23. 25 May, 2022 1 commit
  24. 24 May, 2022 1 commit
  25. 21 May, 2022 1 commit
  26. 01 May, 2022 1 commit
  27. 29 Apr, 2022 1 commit
  28. 27 Apr, 2022 1 commit
  29. 26 Apr, 2022 1 commit
    • Ben Gamari's avatar
      testsuite/process011: Don't rely on Python · 5368b95f
      Ben Gamari authored
      The refactor of `process011` performed in 8cd7e043, where
      the test is taught to use `python3` instead of `sh`, has broken the test
      on Debian 10. Specifically, for reasons that I don't yet understand,
      `python3` exits with code 1 not code 2 when killing itself with
      signal 2. Strangely, my tests on other distributions (e.g. NixOS)
      suggest that Python's behavior in this case is rather inconsistent.
      
      To avoid this, we now rather use a dedicated C program instead of
      Python.
      
      Fixes #241.
      5368b95f