#5005: epollCreate: unsupported operation (Function not implemented)
---------------------------------+------------------------------------------
Reporter: nomeata | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.0.2 | Keywords:
Testcase: | Blockedby:
Os: Linux | Blocking:
Architecture: Unknown/Multiple | Failure: Compile-time crash
---------------------------------+------------------------------------------
Comment(by nomeata):
Hi,
Replying to [comment:6 tibbe]:
> So it's only possible to detect this at run-time? Here's what we
currently do:
>
> {{{
> epollCreate :: IO EPollFd
> epollCreate = do
> fd <- throwErrnoIfMinus1 "epollCreate" $
> #if defined(HAVE_EPOLL_CREATE1)
> c_epoll_create1 (#const EPOLL_CLOEXEC)
> #else
> c_epoll_create 256 -- argument is ignored
> setCloseOnExec fd
> #endif
> let !epollFd' = EPollFd fd
> return epollFd'
> }}}
>
> I'd be fine to include a run-time check if necessary.
right, I saw that. The problem is that we (at least in Debian) expect a
ghc built on a newer kernel to also work on an older kernel.
The alternative to a run-time check is using epoll_create() only. The only
difference is, as far I was told, when another thread forks between the
call to epoll_create() and setCloseOnExit. Given that this is acceptable
behaviour on pre-2.6.27 kernels, woudn’t it be acceptable behaviour on
later kernels as well?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5005#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs