-
Notifications
You must be signed in to change notification settings - Fork 86
configure: Ensure that posix_spawnp reports ENOENT correctly #232
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
Conversation
It turns out that POSIX allows implementations to report errors "lazily" by exiting the spawned process with code 127. In particular, OpenBSD's implementation returns successfully if the requested executable doesn't exist. This severely hampers our ability to report errors accurately. In this patch we add a `configure` test for sensible error-reporting from `posix_spawnp` and disable it if the test fails. Fixes haskell#224.
@blackgnezdo, could you possibly test this? |
I'd be happy to. Is there a better way than plugging this into a full ghc build? I remember having trouble building |
Here's the result after running
|
Works great for me on -current OpenBSD. |
It would be great to get a new |
Sure, I'll do that now, I just wanted to wait on #225. |
It turns out that POSIX allows implementations to report
errors "lazily" by exiting the spawned process with code 127.
In particular, OpenBSD's implementation returns successfully if the
requested executable doesn't exist. This severely hampers our ability to
report errors accurately.
In this patch we add a
configure
test for sensible error-reportingfrom
posix_spawnp
and disable it if the test fails.Fixes #224.