Introduction
Introduction Statistics Contact Development Disclaimer Help
Don't process incomplete reads - sinit - suckless init
git clone git://git.suckless.org/sinit
Log
Files
Refs
README
LICENSE
---
commit d463e0109543c20269d69b691db59349ef8f05aa
parent 9ad5329913cf99e5498ddff228d5906f9570e28b
Author: sin <[email protected]>
Date: Fri, 7 Feb 2014 16:50:01 +0000
Don't process incomplete reads
If that can ever happen...
Diffstat:
M sinit.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_…
dispatchsig[i].func();
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.