diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2016-06-21 18:19:11 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2016-06-26 13:55:31 +0300 |
commit | 1ad3d93eb888ae7db3dd97e43e611979352b1aac (patch) | |
tree | 999111caeec71c4e5af728b384d02a91b8d76b3d /uloop.h | |
parent | 1f019ceea1ed39286e6bccfb3ff936c22fe0f7c0 (diff) |
loop: make uloop_run() return the cancelling signal
When a process quits in response to a signal it handles, it should to so
be re-sending the signal to itself. This especially important for SIGINT,
as is explained in [1].
uloop currently hides the reason for quitting uloop_run(). Fix this by
returning the signal that caused the loop to quit (or 0 when uloop_end()
was used), so a program using loop an comply with [1].
[1] https://www.cons.org/cracauer/sigint.html
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Diffstat (limited to 'uloop.h')
-rw-r--r-- | uloop.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -103,7 +103,7 @@ static inline void uloop_end(void) } int uloop_init(void); -void uloop_run(void); +int uloop_run(void); void uloop_done(void); #endif |