sinit

suckless init
git clone git://git.suckless.org/sinit
Log | Files | Refs | README | LICENSE

commit d463e0109543c20269d69b691db59349ef8f05aa
parent 9ad5329913cf99e5498ddff228d5906f9570e28b
Author: sin <sin@2f30.org>
Date:   Fri,  7 Feb 2014 16:50:01 +0000

Don't process incomplete reads

If that can ever happen...

Diffstat:
Msinit.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/sinit.c b/sinit.c @@ -79,6 +79,8 @@ main(void) n = read(sigfd, &siginfo, sizeof(siginfo)); if (n < 0) eprintf("sinit: read:"); + if (n != sizeof(siginfo)) + continue; for (i = 0; i < LEN(dispatchsig); i++) if (dispatchsig[i].sig == siginfo.ssi_signo) dispatchsig[i].func();