--- init.c-orig 2014-02-10 21:19:50.558078539 +0100 +++ init.c 2014-02-10 21:20:15.650079136 +0100 @@ -2332,7 +2332,12 @@ */ if (pipe_fd < 0) { if ((pipe_fd = open(INIT_FIFO, O_RDWR|O_NONBLOCK)) >= 0) { - fstat(pipe_fd, &st); + if(fstat(pipe_fd, &t) < 0){ + initlog(L_VB, "Failed to stat %s", INIT_FIFO); + close(pipe_fd); + pipe_fd = -1; + } + if (!S_ISFIFO(st.st_mode)) { initlog(L_VB, "%s is not a fifo", INIT_FIFO); close(pipe_fd);