From 1ad3d93eb888ae7db3dd97e43e611979352b1aac Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 21 Jun 2016 17:19:11 +0200 Subject: 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 --- uloop.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'uloop.h') diff --git a/uloop.h b/uloop.h index 7564514..2f1eb4c 100644 --- a/uloop.h +++ b/uloop.h @@ -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 -- cgit v1.2.3