tests: Silence startone harder

parent a29f38cb
...@@ -163,13 +163,18 @@ int main(int argc, char *argv[]) ...@@ -163,13 +163,18 @@ int main(int argc, char *argv[])
exit(1); exit(1);
} }
c->want_daemonize(c, false); c->want_daemonize(c, false);
c->want_close_all_fds(c, true);
pid_t pid = fork(); pid_t pid = fork();
if (pid < 0) { if (pid < 0) {
fprintf(stderr, "%d: fork failed\n", __LINE__); fprintf(stderr, "%d: fork failed\n", __LINE__);
goto out; goto out;
} }
if (pid == 0) { if (pid == 0) {
close(0);
close(1);
close(2);
open("/dev/zero", O_RDONLY);
open("/dev/null", O_RDWR);
open("/dev/null", O_RDWR);
b = c->startl(c, 0, NULL); b = c->startl(c, 0, NULL);
if (!b) if (!b)
fprintf(stderr, "%d: %s failed to start\n", __LINE__, c->name); fprintf(stderr, "%d: %s failed to start\n", __LINE__, c->name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment