Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Race condition in stopProcess / pCleanup #69

Open
sol opened this issue May 11, 2023 · 0 comments
Open

Race condition in stopProcess / pCleanup #69

sol opened this issue May 11, 2023 · 0 comments

Comments

@sol
Copy link
Contributor

sol commented May 11, 2023

Steps to reproduce:

ghci> import Control.Exception
ghci> import System.Process.Typed
ghci> let config = setStdout createPipe (proc "echo" ["foo"])
ghci> withProcessWait config $ \ p -> Data.ByteString.hGetContents (getStdout p) >> throwIO DivideByZero
*** Exception: waitForProcess: does not exist (No child processes)

We would expect to see DivideByZero but instead get an IOException of type NoSuchThing.

I think this is easy to fix, PR underway.

sol added a commit to sol/typed-process that referenced this issue May 11, 2023
sol added a commit to sol/typed-process that referenced this issue May 11, 2023
sol added a commit to sol/typed-process that referenced this issue May 11, 2023
sol added a commit to sol/typed-process that referenced this issue May 11, 2023
sol added a commit to sol/typed-process that referenced this issue May 14, 2023
sol added a commit to sol/typed-process that referenced this issue May 23, 2023
sol added a commit to sol/typed-process that referenced this issue May 23, 2023
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

No branches or pull requests

1 participant