|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59728 cannot detect event on regular file (epoll_ctl syscall just fails with EPERM)
Submitted: 2011-04-20 19:09 UTC Modified: 2013-01-31 19:18 UTC
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: david dot barre at gmail dot com Assigned: tony2001 (profile)
Status: Not a bug Package: libevent (PECL)
PHP Version: 5.3.3 OS: linux 2.6.32 debian 6.0
Private report: No CVE-ID: None
 [2011-04-20 19:09 UTC] david dot barre at gmail dot com
I use libevent 1.4.2 and I have the same problem describe in this page :

I quote :
"I?m on Linux and this script will just exit when I run it on a regular file.
I straced it and it seems like the epoll_ctl syscall just fails with EPERM ( permission denied ) when it tries to set polling for the file descriptor"

Mac os X users don't semms to have any problem

Reproduce code:

Expected result:
script is waiting for event on regular file

Actual result:
test code quit immediately if i try to detect event on a regular file

But it's working on STDIN or "http://ww...."


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-08-23 06:19 UTC] marc-bennewith at arcor dot de
As described here:
Libevent uses Epoll and Epoll doesn't support regular Unix files.

To solve the issue libevent should avoid "epoll" if a regular file descriptor was given or wrap config functions to make it possible on PHP level.
 [2013-01-25 08:53 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: tony2001
 [2013-01-31 19:18 UTC]
Not PHP problem, but some original library issue instead.
 [2013-01-31 19:18 UTC]
-Status: Assigned +Status: Not a bug
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 17 08:01:32 2024 UTC