Skip to content

Commit

Permalink
daemon: Add comment.
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
blp committed May 14, 2012
1 parent 7dea6ac commit e6c5e53
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,17 @@ daemonize(void)
daemonize_complete();
}

/* Forks, then:
*
* - In the parent, waits for the child to signal that it has completed its
* startup sequence. Then stores -1 in '*fdp' and returns the child's pid.
*
* - In the child, stores a fd in '*fdp' and returns 0. The caller should
* pass the fd to fork_notify_startup() after it finishes its startup
* sequence.
*
* If something goes wrong with the fork, logs a critical error and aborts the
* process. */
static pid_t
fork_and_wait_for_startup(int *fdp)
{
Expand Down

0 comments on commit e6c5e53

Please sign in to comment.