Error checking if /dev/null not available. - rfkilld - An rfkill daemon, which runs scripts according to rfkill events.
       
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit 4bb6cf4c22054db6f2165a4353f5e7a2e43d4803
 (DIR) parent 361feba39eb798d0d3c1c037a4b77d4d8fbadf9e
 (HTM) 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(-)
       ---
 (DIR) 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)