You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, we also deadlock on waitExitCode with delegate_ctlc on ctrl-c, as in that case pExitCode will be left empty:
$ cabal exec -- ghci -isrc src/System/Process/Typed.hs
ghci> withProcessWait (setDelegateCtlc True $ proc "sleep" ["100"]) $ \ p -> waitExitCode p
^C
*** Exception: thread blocked indefinitely in an STM transaction
(I'm using cabal exec instead of stack exec here, as stack exec fails with a different error. I assume that this is due to stack using typed-process itself and hence it is itself affected by this bug and #69.)
You could address this by say storing an Either SomeException ExitCode in pExitCode, but async already solved this for us. So I think we should rely on async instead.
Once we are done with #70, I'll open a PR along the lines of sol@3e37a48, which addresses this issue.
The text was updated successfully, but these errors were encountered:
When
delegate_ctlc
is used thenwaitForProcess
throwsUserInterrupt
if the child terminated due toctrl-c
.However, we ignore any such exceptions.
waitForProcess
heretyped-process/src/System/Process/Typed.hs
Line 226 in 788209f
Left
-value heretyped-process/src/System/Process/Typed.hs
Line 250 in 788209f
typed-process/src/System/Process/Typed.hs
Line 258 in 788209f
AsyncCancelled
)#70 addresses this specific problem.
However, we also deadlock on
waitExitCode
withdelegate_ctlc
onctrl-c
, as in that casepExitCode
will be left empty:(I'm using
cabal exec
instead ofstack exec
here, asstack exec
fails with a different error. I assume that this is due tostack
usingtyped-process
itself and hence it is itself affected by this bug and #69.)You could address this by say storing an
Either SomeException ExitCode
inpExitCode
, butasync
already solved this for us. So I think we should rely onasync
instead.Once we are done with #70, I'll open a PR along the lines of sol@3e37a48, which addresses this issue.
The text was updated successfully, but these errors were encountered: