From: Rusty Russell Date: Tue, 29 Oct 2013 10:31:32 +0000 (+1030) Subject: daemonize / daemon_with_notify: ignore Ubuntu 13.10 brain death. X-Git-Url: http://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=6d12f6a12d5c641c1060307c68a815185e9f5907 daemonize / daemon_with_notify: ignore Ubuntu 13.10 brain death. Apparently init --user adopts orphans. To quote the author Stewart Smith: As much as one can be happy in Ubuntu breaking something that has been true for what must be approaching 40 years, yep, I'm happy for you to make the changes. Signed-off-by: Rusty Russell --- diff --git a/ccan/daemon_with_notify/test/run.c b/ccan/daemon_with_notify/test/run.c index 3af42043..17d9ee91 100644 --- a/ccan/daemon_with_notify/test/run.c +++ b/ccan/daemon_with_notify/test/run.c @@ -20,7 +20,7 @@ int main(int argc, char *argv[]) struct child_data daemonized; pid_t pid; - plan_tests(6); + plan_tests(5); if (pipe(fds) != 0) err(1, "Failed pipe"); @@ -65,7 +65,9 @@ int main(int argc, char *argv[]) err(1, "Failed read"); ok1(daemonized.pid != pid); +#if 0 /* Believe it or not, this fails under Ubuntu 13.10 (Upstart) */ ok1(daemonized.ppid == 1); +#endif ok1(daemonized.in_root_dir); ok1(daemonized.read_from_stdin == 0); ok1(daemonized.write_to_stdout == 0); diff --git a/ccan/daemonize/test/run.c b/ccan/daemonize/test/run.c index 9bb966da..73f02111 100644 --- a/ccan/daemonize/test/run.c +++ b/ccan/daemonize/test/run.c @@ -20,7 +20,7 @@ int main(int argc, char *argv[]) struct child_data daemonized; pid_t pid; - plan_tests(6); + plan_tests(5); if (pipe(fds) != 0) err(1, "Failed pipe"); @@ -64,7 +64,9 @@ int main(int argc, char *argv[]) err(1, "Failed read"); ok1(daemonized.pid != pid); +#if 0 /* Believe it or not, this fails under Ubuntu 13.10 (Upstart) */ ok1(daemonized.ppid == 1); +#endif ok1(daemonized.in_root_dir); ok1(daemonized.read_from_stdin == EBADF); ok1(daemonized.write_to_stdout == EBADF);