Skip to content

Commit

Permalink
src/rc/supervise-daemon.c: formatting fixes
Browse files Browse the repository at this point in the history
Fix misleading indentation and other erroneous whitespace.
This fixes #273.
  • Loading branch information
philhofer authored and williamh committed Dec 24, 2018
1 parent d328de1 commit 97e74f9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/rc/supervise-daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ static char * expand_home(const char *home, const char *path)
ppath++;

if (!home) {
free(opath);
free(opath);
return xstrdup(path);
}
if (!ppath) {
Expand Down Expand Up @@ -535,7 +535,7 @@ static void supervisor(char *exec, char **argv)
sigaction(SIGTERM, &sa, NULL);

fp = fopen(pidfile, "w");
if (! fp)
if (!fp)
eerrorx("%s: fopen `%s': %s", applet, pidfile, strerror(errno));
fprintf(fp, "%d\n", getpid());
fclose(fp);
Expand All @@ -557,10 +557,10 @@ static void supervisor(char *exec, char **argv)
alarm(healthcheckdelay);
else if (healthchecktimer)
alarm(healthchecktimer);
failing = 0;
failing = 0;
while (!exiting) {
healthcheck_respawn = 0;
fifo_fd = open(fifopath, O_RDONLY);
fifo_fd = open(fifopath, O_RDONLY);
if (fifo_fd > 0) {
memset(buf, 0, sizeof(buf));
count = read(fifo_fd, buf, sizeof(buf) - 1);
Expand Down Expand Up @@ -604,7 +604,7 @@ static void supervisor(char *exec, char **argv)
healthcheck_respawn = 1;
}
}
if (exiting ) {
if (exiting) {
alarm(0);
syslog(LOG_INFO, "stopping %s, pid %d", exec, child_pid);
nkilled = run_stop_schedule(applet, NULL, NULL, child_pid, 0,
Expand Down Expand Up @@ -1062,8 +1062,8 @@ int main(int argc, char **argv)
c++;
}
xasprintf(&varbuf, "%d", x);
rc_service_value_set(svcname, "argc", varbuf);
free(varbuf);
rc_service_value_set(svcname, "argc", varbuf);
free(varbuf);
rc_service_value_set(svcname, "exec", exec);
supervisor(exec, argv);
} else
Expand Down

0 comments on commit 97e74f9

Please sign in to comment.