Wait in foreground process until daemon is fully initialized

Exit when all sockets are ready and initstepslew command and rtc step
are completed. Also, in case of a fatal error, print the error message
and exit with a non-zero status.
This commit is contained in:
Miroslav Lichvar
2011-08-26 14:47:30 +02:00
parent 7fb50d9a3e
commit 1d2a0856b4
3 changed files with 58 additions and 5 deletions

View File

@@ -85,6 +85,12 @@ extern void LOG_Position(const char *filename, int line_number, const char *func
/* Log messages to syslog instead of stderr */
extern void LOG_OpenSystemLog(void);
/* Send fatal message also to the foreground process */
extern void LOG_SetParentFd(int fd);
/* Close the pipe to the foreground process so it can exit */
extern void LOG_CloseParentFd(void);
/* Return zero once per 10 seconds */
extern int LOG_RateLimited(void);