diff options
author | Tom Gundersen <teg@jklm.no> | 2014-08-15 21:04:07 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-08-20 17:24:11 +0200 |
commit | 9b364545435d2b65fcf73519b3064bb7c28093b7 (patch) | |
tree | f2512f69d82c2d41ea0a6d6baf93eace58901adf /src/libsystemd/sd-event/sd-event.c | |
parent | a9feff3d774eaa1cc1b59189e8f344c01e69f888 (diff) |
sd-event: add API to access epoll_fd
This is a prerequisite for integrating sd-event into an external
event loop.
Diffstat (limited to 'src/libsystemd/sd-event/sd-event.c')
-rw-r--r-- | src/libsystemd/sd-event/sd-event.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index 7917ab934a..e062997a80 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -2361,6 +2361,14 @@ finish: return r; } +_public_ int sd_event_get_fd(sd_event *e) { + + assert_return(e, -EINVAL); + assert_return(!event_pid_changed(e), -ECHILD); + + return e->epoll_fd; +} + _public_ int sd_event_get_state(sd_event *e) { assert_return(e, -EINVAL); assert_return(!event_pid_changed(e), -ECHILD); |