rfkilld

An rfkill daemon, which runs scripts according to rfkill events.
git clone git://r-36.net/rfkilld
Log | Files | Refs | LICENSE

commit 4bb6cf4c22054db6f2165a4353f5e7a2e43d4803
parent 361feba39eb798d0d3c1c037a4b77d4d8fbadf9e
Author: Christoph Lohmann <20h@r-36.net>
Date:   Wed,  2 May 2012 21:23:23 +0200

Error checking if /dev/null not available.

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

diff --git a/rfkilld.c b/rfkilld.c @@ -102,6 +102,8 @@ runifexecutable(char *file, char *oname, char *ostate) if (!(pid = fork())) { if (!fork()) { fd = open("/dev/null", O_RDWR); + if (fd < 0) + edie("open"); dup2(fd, 1); dup2(fd, 2); if (fd > 2)