Use process jobs when spawning subprocesses#6529
Use process jobs when spawning subprocesses#6529bgamari wants to merge 1 commit intohaskell:masterfrom
Conversation
ab70010 to
b6b1ffc
Compare
|
8085f6a to
db1153e
Compare
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
ad5984c to
e4db2dc
Compare
|
There's small failure in Distribution/Simple/Utils.hs:711:56:
`Process.delegate_ctlc' is not a (visible) constructor field namebut I can take care of it, if the (restarted) OSX job turns out happy. |
|
I won't merge this until |
|
Also, is there a way to see difference between |
|
What action is required here? I believe the
You could spawn a process which |
|
Merged as part of #6536 |
Many toolchain tools written for POSIX systems rely on the exec system
call. Unfortunately, it is not possible to implement
execin aPOSIX-compliant manner on Windows. In particular, the semantics of the
execimplementation provided by the widely-usedmsvcrtC runtimewill cause process's waiting on the
exec'ing process to incorrectlyconclude that the process has successfully terminated when in fact it is
still running in another process.
For this reason, the
processlibrary exposes theuse_process_jobsflag 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
processlibrary is currently quitebroken 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