Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2016-06-21 18:19:11 +0300
committerFelix Fietkau <nbd@nbd.name>2016-06-26 13:55:31 +0300
commit1ad3d93eb888ae7db3dd97e43e611979352b1aac (patch)
tree999111caeec71c4e5af728b384d02a91b8d76b3d /uloop.h
parent1f019ceea1ed39286e6bccfb3ff936c22fe0f7c0 (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.h2
1 files changed, 1 insertions, 1 deletions
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