X-Git-Url: https://rtime.felk.cvut.cz/gitweb/can-utils.git/blobdiff_plain/35d2bc1381f04e0fcc5baadf9d1ddad8db0187d3..16c970d40e6c19dde705bad4751bab1a3a4f3a0d:/slcand.c diff --git a/slcand.c b/slcand.c index 323f4ec..30f5127 100644 --- a/slcand.c +++ b/slcand.c @@ -177,7 +177,6 @@ static pid_t daemonize(const char *lockfile, char *tty, char *name) pid_t pid, sid, parent; int lfp = -1; FILE *pFile; - FILE *dummyFile; char const *pidprefix = "/var/run/"; char const *pidsuffix = ".pid"; @@ -275,9 +274,9 @@ static pid_t daemonize(const char *lockfile, char *tty, char *name) } /* Redirect standard files to /dev/null */ - dummyFile = freopen("/dev/null", "r", stdin); - dummyFile = freopen("/dev/null", "w", stdout); - dummyFile = freopen("/dev/null", "w", stderr); + pFile = freopen("/dev/null", "r", stdin); + pFile = freopen("/dev/null", "w", stdout); + pFile = freopen("/dev/null", "w", stderr); /* Tell the parent process that we are A-okay */ /* kill(parent, SIGUSR1); */