smarthome icon indicating copy to clipboard operation
smarthome copied to clipboard

"OS: Any Linux or Unix System should be fine"? (EPOLLxx)

Open hurzl opened this issue 11 years ago • 4 comments

You are using select.epoll in lib/connection.py which is Linux-only.

http://docs.python.org/3/library/select.html : select.epoll(sizehint=-1, flags=0) (Only supported on Linux 2.5.44 and newer.)

Is this absolutely necessary?

FreeBSD:

>>> dir(select)
['KQ_EV_ADD', 'KQ_EV_CLEAR', 'KQ_EV_DELETE', 'KQ_EV_DISABLE', 'KQ_EV_ENABLE', 'KQ_EV_EOF', 'KQ_EV_ERROR', 'KQ_EV_FLAG1', 'KQ_EV_ONESHOT', 'KQ_EV_SYSFLAGS', 'KQ_FILTER_AIO', 'KQ_FILTER_PROC', 'KQ_FILTER_READ', 'KQ_FILTER_SIGNAL', 'KQ_FILTER_TIMER', 'KQ_FILTER_VNODE', 'KQ_FILTER_WRITE', 'KQ_NOTE_ATTRIB', 'KQ_NOTE_CHILD', 'KQ_NOTE_DELETE', 'KQ_NOTE_EXEC', 'KQ_NOTE_EXIT', 'KQ_NOTE_EXTEND', 'KQ_NOTE_FORK', 'KQ_NOTE_LINK', 'KQ_NOTE_LOWAT', 'KQ_NOTE_PCTRLMASK', 'KQ_NOTE_PDATAMASK', 'KQ_NOTE_RENAME', 'KQ_NOTE_REVOKE', 'KQ_NOTE_TRACK', 'KQ_NOTE_TRACKERR', 'KQ_NOTE_WRITE', 'PIPE_BUF', 'POLLERR', 'POLLHUP', 'POLLIN', 'POLLNVAL', 'POLLOUT', 'POLLPRI', 'POLLRDBAND', 'POLLRDNORM', 'POLLWRBAND', 'POLLWRNORM', '__doc__', '__file__', '__name__', '__package__', 'error', 'kevent', 'kqueue', 'poll', 'select']

hurzl avatar Jan 14 '14 10:01 hurzl

Hi,

no this is not absolutely necessary. But since I support Linux (at this time) only. It should be easy to adapt it to Kqueues.

So long

Marcus

mknx avatar Jan 21 '14 16:01 mknx

Add me to the list. Would like to use it on my MacMini-Server.

boecko avatar Mar 13 '14 10:03 boecko

We should rename the issue to "xBSD support" lib/daemon.py def get_pid(filename) is Linux-specific (/proc), too

boecko avatar Mar 13 '14 10:03 boecko

Made a pull request, see #99

boecko avatar Mar 25 '14 08:03 boecko