Matthias Lederhofer wrote: > > [daemonize] > + if ((devnull = open("/dev/null", O_RDWR, 0)) == -1) > + die("open /dev/null failed: %s", strerror(errno)); > + if (dup2(devnull, 0) != 0 || > + dup2(devnull, 1) != 1 || > + dup2(devnull, 2) != 2) > + die("dup2 failed: %s", strerror(errno)); > +} Hmm... leaks devnull. Why not simply close(0/1/2) and let sanitize_stdfds take care of the rest? Ciao, ET. - : send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html