Daemons detach atomically to avoid having to wait

Tests that start daemons have to "wait" for them to start.

This commit makes Heimdal daemons prep to detach (when requested) by
forking early, then having the child signal readiness to the parent when
the child really is ready.  The parent exits only which the child is
ready.  This means that tests will no longer need to wait for daemons.

However, tests will still need a pidfile or such so they can stop the
daemons.

Note that the --detach options should not be used on OS X from launchd,
only from tests.
This commit is contained in:
Nicolas Williams
2015-03-17 16:03:15 -05:00
parent 0778b19c3f
commit b48bed5f42
25 changed files with 522 additions and 197 deletions

View File

@@ -162,6 +162,8 @@ HEIMDAL_ROKEN_1.0 {
rk_warnerr;
rk_xfree;
roken_concat;
roken_detach_prep;
roken_detach_finish;
roken_getaddrinfo_hostspec2;
roken_getaddrinfo_hostspec;
roken_gethostby_setup;