diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2014-09-22 18:05:19 +0200 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2014-09-22 18:14:44 +0200 |
commit | c17091b79773e9c458f03a897b26c2257d7366a7 (patch) | |
tree | f0ea2da846215542a6734a81c3686d498ce6af15 /src/libsystemd-terminal/modeset.c | |
parent | ed3a9f6a30958ef90a24bc60aec86493974101d3 (diff) |
terminal: signal object removal during sysview_context_stop()
Now that we no longer propagate callback return values, we can safely call
into user-callbacks during sysview_context_stop(). This way, users can
rely on all objects to be removed via callbacks (except if they failed
during object creation). This avoids duplicating any object hashtables on
the users' side and reduces memory consumption.
Diffstat (limited to 'src/libsystemd-terminal/modeset.c')
-rw-r--r-- | src/libsystemd-terminal/modeset.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsystemd-terminal/modeset.c b/src/libsystemd-terminal/modeset.c index 7a28e7ab97..f564fa0f65 100644 --- a/src/libsystemd-terminal/modeset.c +++ b/src/libsystemd-terminal/modeset.c @@ -332,7 +332,8 @@ static int modeset_sysview_fn(sysview_context *c, void *userdata, sysview_event grdev_session_restore(m->grdev_session); grdev_session_disable(m->grdev_session); m->grdev_session = grdev_session_free(m->grdev_session); - sd_event_exit(m->event, 0); + if (sd_event_get_exit_code(m->event, &r) == -ENODATA) + sd_event_exit(m->event, 0); break; case SYSVIEW_EVENT_SESSION_ATTACH: d = ev->session_attach.device; |