Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/haskell/process. Pull mirroring updated .
  1. Apr 17, 2025
  2. Feb 18, 2025
  3. Jan 24, 2025
  4. Jan 04, 2025
  5. Nov 24, 2024
  6. Oct 30, 2024
  7. Sep 30, 2024
  8. Sep 29, 2024
  9. Sep 23, 2024
  10. Sep 06, 2024
  11. Sep 04, 2024
  12. Aug 16, 2024
  13. Aug 08, 2024
  14. Jul 25, 2024
    • sheaf's avatar
      Don't attach finalizers to CommunicationHandles · 511b901a
      sheaf authored
      We are now careful to not attach any Handle finalizers when creating
      pipes for inter-process communication on Unix systems. Instead, the
      handles are closed manually.
      
      The finalizers were causing problems in situations such as the following:
      
        - the parent creates a new pipe, e.g. pipe2([7,8]),
        - the parent spawns a child process, and lets FD 8 be inherited by the child,
        - the parent closes FD 8 (as it should),
        - the parent opens FD 8 for some other purpose, e.g. for writing to a file,
        - the finalizer for the Handle wrapping FD 8 runs, closing FD 8, even though
          it is now in use for a completely different purpose.
      
      This commit does not include a test, as the above bug is a bit difficult
      to trigger.
      511b901a
  15. Jul 01, 2024
  16. May 16, 2024
  17. Apr 26, 2024
  18. Apr 25, 2024
  19. Apr 22, 2024
    • sheaf's avatar
      An API for inter-process communication via Handles · a6af24e9
      sheaf authored
      This commit adds the System.Process.CommunicationHandle module, which
      provides the cross-platform CommunicationHandle abstraction which allows
      Handles to be passed to child processes for inter-process communication.
      
      A high-level API is provided by the function
      `readCreateProcessWithExitCodeCommunicationHandle`, which can be
      consulted for further details about how the functionality is meant to be
      used.
      
      To test this functionality, we created a new "cli-child" executable
      component to the process-tests package. To work around Cabal bug #9854,
      it was necessary to change the build-type of the package to `Custom`, in
      order to make the "cli-child" executable visible when running the test-suite.
      The custom Setup.hs script contains more details about the problem.
      a6af24e9
  20. Apr 10, 2024
    • sheaf's avatar
      Update CI to use GitHub Actions · 13ede6d4
      sheaf authored
      13ede6d4
    • sheaf's avatar
      Move tests to separate process-tests package · 59eb3e4e
      sheaf authored
      This commit moves the process testsuite to a separate package.
      The rationale is that later commits require the test-suite to use a
      Custom setup in order to work around Cabal bug #9854. This introduces a
      setup-depends dependency on the Cabal library, and we would very much
      like to avoid the dependency cycle:
      
        Cabal depends on process
        process depends on Cabal
      
      Instead, splitting up the test-suite, we have:
      
        Cabal depends on process
        process-tests depends on process and on Cabal
      
      To run the test-suite, you can use either of the following commands:
      
      > cabal run process-tests:test
      > stack test process-tests
      
      There are a few other auxiliary changes, such as:
      
        - Using Cabal version >= 2.4 in the .cabal files,
          and fixing the associated warnings,
        - Using the CPP mingw32_HOST_OS define to check for Windows;
          this avoids having to define the same variable twice in two
          different packages.
      59eb3e4e
    • Ben Gamari's avatar
      Windows: Implement mitigation for % expansion · 5fc91f5f
      Ben Gamari authored
      Another aspect of the BatBadBut vulnerability that the previous patch
      did not address is the fact that `%` cannot be easily escaped in a
      double-quoted string. The vulnerability discussion suggests
      transliterating `%` as `%%cd:~,%`, which should evaluate to an empty
      string assuming that the `DelayedExpansion` registry setting is
      disabled.
      
      Here I have implemented this additional mitigation.
      5fc91f5f
  21. Apr 09, 2024
Loading