diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-05-15 01:55:18 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-05-15 17:13:04 +0200 |
commit | a71fe8b8aee1cb78c4d8c56eeb234743f64e4b4d (patch) | |
tree | b402a18725a2660e85db586b7063b567652fbdd7 /src/libsystemd/sd-event/test-event.c | |
parent | 574634bcacb01efe15ca2742effd461a5b7afb5f (diff) |
sd-event: introduce concept of "floating" event sources
These are the counterpart of "floating" bus slots, i.e. event sources
that are bound to the lifetime of the event object itself, and thus
don't require an explicit reference to be kept.
Diffstat (limited to 'src/libsystemd/sd-event/test-event.c')
-rw-r--r-- | src/libsystemd/sd-event/test-event.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libsystemd/sd-event/test-event.c b/src/libsystemd/sd-event/test-event.c index 3342ec6968..ffefb14b74 100644 --- a/src/libsystemd/sd-event/test-event.c +++ b/src/libsystemd/sd-event/test-event.c @@ -206,6 +206,10 @@ int main(int argc, char *argv[]) { assert_se(sd_event_source_set_enabled(z, SD_EVENT_ONESHOT) >= 0); assert_se(sd_event_source_set_prepare(z, prepare_handler) >= 0); + /* Test for floating event sources */ + assert_se(sigprocmask_many(SIG_BLOCK, SIGRTMIN+1, -1) == 0); + assert_se(sd_event_add_signal(e, NULL, SIGRTMIN+1, NULL, NULL) >= 0); + assert_se(write(a[1], &ch, 1) >= 0); assert_se(write(b[1], &ch, 1) >= 0); |