diff options
author | sin <sin@2f30.org> | 2014-04-21 10:27:49 +0100 |
---|---|---|
committer | sin <sin@2f30.org> | 2014-04-21 10:38:21 +0100 |
commit | b1b19ccf2786b06cbbe7a7986a08324f685ca036 (patch) | |
tree | 377f475d7d14cedde5174e6acf551e559be5c1ae | |
parent | d1bb8b1a30f059724da20185d17a9565088c322a (diff) |
Break on first signal found
-rw-r--r-- | sinit.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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; |