[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: "epollCreate: unsupported operation" on buildd hosts



Hi,

Am Mittwoch, den 09.03.2011, 10:22 +0100 schrieb Julien Cristau:
> epoll_create1 was added in 2.6.27, afaict.  If that's what haskell is
> using, then it's not unexpected to have it fail on 2.6.26.

good shot, thanks!

From ./libraries/base/System/Event/EPoll.hsc: (this line does not start with ">")

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'

#if defined(HAVE_EPOLL_CREATE1)
foreign import ccall unsafe "sys/epoll.h epoll_create1"
    c_epoll_create1 :: CInt -> IO CInt
#else
foreign import ccall unsafe "sys/epoll.h epoll_create"
    c_epoll_create :: CInt -> IO CInt
#endif


and in libraries/base/configure.ac:
AC_CHECK_FUNCS([epoll_create1 epoll_ctl eventfd kevent kevent64 kqueue poll])


So what is the conclusion? Do we need to disable the use of
epoll_create1 completely? Or is it actually so that the libc should map
uses of epoll_create1 to epoll_create? Or do we need to introduce
run-time checks as to whether epoll_create1 is available?



Thanks,
Joachim

-- 
Joachim "nomeata" Breitner
Debian Developer
  nomeata@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: nomeata@joachim-breitner.de | http://people.debian.org/~nomeata

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: