}
static void checkfg(void)
-{
- if (bgtag)
- die(EXIT_FAILURE, "unexpected foreground response");
-}
+ { if (bgtag) die(EXIT_FAILURE, "unexpected foreground response"); }
static void cline(char *p, size_t len, void *b)
{
static void sighup(int sig, void *v) { logfile(logname); }
-static void cleanup(void)
-{
- if (pidfile)
- unlink(pidfile);
-}
+static void cleanup(void) { if (pidfile) unlink(pidfile); }
static void sigdie(int sig)
-{
- cleanup();
- signal(sig, SIG_DFL);
- raise(sig);
-}
+ { cleanup(); signal(sig, SIG_DFL); raise(sig); }
static void version(FILE *fp)
{ pquis(fp, "$, TrIPE version " VERSION "\n"); }
if (!kid) {
dup2(pfd[1], STDIN_FILENO);
dup2(pfd[1], STDOUT_FILENO);
- close(pfd[1]);
close(pfd[0]);
- if (logfp)
- fclose(logfp);
- if (pidfp)
- fclose(pidfp);
+ close(pfd[1]);
+ if (logfp) fclose(logfp);
+ if (pidfp) fclose(pidfp);
closelog();
- if (f & f_daemon)
- detachtty();
+ if (f & f_daemon) detachtty();
execvp(DA(&spawnopts)[0], DA(&spawnopts));
die(127, "couldn't exec `%s': %s", spawnpath, strerror(errno));
}