aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sinit.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sinit.c b/sinit.c
index a0eb868..9dcb02b 100644
--- a/sinit.c
+++ b/sinit.c
@@ -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;