From ba6988bd893eb08c54ffdb144700530e3a683d6e Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 17 Aug 2011 12:46:48 +0200 Subject: some more doxygen work (include the notion of modules) --- src/application.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/application.c') diff --git a/src/application.c b/src/application.c index b7e943d7..6871df17 100644 --- a/src/application.c +++ b/src/application.c @@ -21,6 +21,10 @@ * */ +/*! \file application.c + * \brief Routines for helping with the osmocom application setup. + */ + #include #include @@ -33,6 +37,7 @@ struct log_target *osmo_stderr_target; +/*! \brief Ignore \ref SIGPIPE, \ref SIGALRM, \ref SIGHUP and \ref SIGIO */ void osmo_init_ignore_signals(void) { /* Signals that by default would terminate */ @@ -42,6 +47,13 @@ void osmo_init_ignore_signals(void) signal(SIGIO, SIG_IGN); } +/*! \brief Initialize the osmocom logging framework + * \param[in] log_info Array of available logging sub-systems + * \returns 0 on success, -1 in case of error + * + * This function initializes the osmocom logging systems. It also + * creates the default (stderr) logging target. + */ int osmo_init_logging(const struct log_info *log_info) { log_init(log_info, NULL); @@ -54,6 +66,11 @@ int osmo_init_logging(const struct log_info *log_info) return 0; } +/*! \brief Turn the current process into a background daemon + * + * This function will fork the process, exit the parent and set umask, + * create a new session, close stdin/stdout/stderr and chdir to /tmp + */ int osmo_daemonize(void) { int rc; -- cgit v1.2.3