+2004-03-04 Theodore Ts'o <tytso@mit.edu>
+
+ * logsave.c (main): Use setsid() to avoid getting killed by init
+ (run_program): Add a newline after reporting the exit code
+ or signal when the program exits.
+
2004-02-28 Theodore Ts'o <tytso@mit.edu>
* Release of E2fsprogs 1.35
rc = WEXITSTATUS(status);
if (rc) {
send_output(argv[0], 0, SEND_BOTH);
- sprintf(buffer, " died with exit status %d", rc);
+ sprintf(buffer, " died with exit status %d\n", rc);
send_output(buffer, 0, SEND_BOTH);
}
} else {
if (WIFSIGNALED(status)) {
send_output(argv[0], 0, SEND_BOTH);
- sprintf(buffer, "died with signal %d",
+ sprintf(buffer, "died with signal %d\n",
WTERMSIG(status));
send_output(buffer, 0, SEND_BOTH);
rc = 1;
outfn);
exit(rc);
}
+ setsid(); /* To avoid getting killed by init */
while (outfd < 0) {
outfd = open(outfn, openflags, 0644);
sleep(1);