[hackers] [sinit] Break on first signal found || sin
commit b1b19ccf2786b06cbbe7a7986a08324f685ca036
Author: sin <sin_AT_2f30.org>
Date: Mon Apr 21 10:27:49 2014 +0100
Break on first signal found
diff --git a/sinit.c b/sinit.c
index a0eb868..9dcb02b 100644
--- a/sinit.c
+++ b/sinit.c
_AT_@ -41,9 +41,12 @@ main(void)
spawn(rcinitcmd);
while (1) {
sigwait(&set, &sig);
- for (i = 0; i < LEN(sigmap); i++)
- if (sigmap[i].sig == sig)
+ for (i = 0; i < LEN(sigmap); i++) {
+ if (sigmap[i].sig == sig) {
sigmap[i].handler();
+ break;
+ }
+ }
}
/* not reachable */
return EXIT_SUCCESS;
Received on Mon Apr 21 2014 - 11:38:54 CEST
This archive was generated by hypermail 2.3.0
: Mon Apr 21 2014 - 11:48:07 CEST