Skip to content

use process jobs#6536

Merged
phadej merged 2 commits intohaskell:masterfrom
phadej:bgamari-use-process-jobs
Feb 12, 2020
Merged

use process jobs#6536
phadej merged 2 commits intohaskell:masterfrom
phadej:bgamari-use-process-jobs

Conversation

@phadej
Copy link
Copy Markdown
Collaborator

@phadej phadej commented Feb 12, 2020

Supersedes #6529

bgamari and others added 2 commits February 12, 2020 20:12
Many toolchain tools written for POSIX systems rely on the exec system
call. Unfortunately, it is not possible to implement `exec` in a
POSIX-compliant manner on Windows. In particular, the semantics of the
`exec` implementation provided by the widely-used `msvcrt` C runtime
will cause process's waiting on the `exec`'ing process to incorrectly
conclude that the process has successfully terminated when in fact it is
still running in another process.

For this reason, the `process` library exposes the `use_process_jobs`
flag to use a more strict (although still not POSIX-compliant) mechanism
for tracking process completion. This is explained in this comment [2].

Unfortunately, job support in the `process` library is currently quite
broken and was only recently fixed [1]. Consequently, we only enable job
object support for process releases >= 1.6.8.

[1] haskell/process#168
[2] https://github.com/haskell/process/blob/master/System/Process.hs#L399
@phadej phadej changed the title Bgamari use process jobs use process jobs Feb 12, 2020
@phadej phadej merged commit b744cde into haskell:master Feb 12, 2020
@phadej phadej deleted the bgamari-use-process-jobs branch February 12, 2020 22:22
@phadej phadej modified the milestones: 3.4.0.0, 3.4.0.0-rc1 Jul 10, 2020
@phadej phadej mentioned this pull request Jul 10, 2020
@phadej phadej mentioned this pull request Oct 25, 2020
@phadej
Copy link
Copy Markdown
Collaborator Author

phadej commented Oct 26, 2020

Backported to 3.2 in #7134

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants