Committer  : entrope
CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Commit time: 2004-10-05 02:47:12 UTC

Modified files:
     ircd/ircd_signal.c

Log message:

Doxyfy ircd_signal.c.

---------------------- diff included ----------------------
Index: ircu2.10/ircd/ircd_signal.c
diff -u ircu2.10/ircd/ircd_signal.c:1.4 ircu2.10/ircd/ircd_signal.c:1.5
--- ircu2.10/ircd/ircd_signal.c:1.4     Wed Jun  6 17:29:47 2001
+++ ircu2.10/ircd/ircd_signal.c Mon Oct  4 19:47:02 2004
@@ -16,8 +16,10 @@
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Id: ircd_signal.c,v 1.4 2001/06/07 00:29:47 kev Exp $
+ */
+/** @file
+ * @brief Signal handlers for ircu.
+ * @version $Id: ircd_signal.c,v 1.5 2004/10/05 02:47:02 entrope Exp $
  */
 #include "config.h"
 
@@ -29,20 +31,30 @@
 #include <assert.h>
 #include <signal.h>
 
+/** Counts various types of signals that we receive. */
 static struct tag_SignalCounter {
-  unsigned int alrm;
-  unsigned int hup;
+  unsigned int alrm; /**< Received SIGALRM count. */
+  unsigned int hup;  /**< Received SIGHUP count. */
 } SignalCounter;
 
+/** Event generator for SIGHUP. */
 static struct Signal sig_hup;
+/** Event generator for SIGINT. */
 static struct Signal sig_int;
+/** Event generator for SIGTERM. */
 static struct Signal sig_term;
 
+/** Signal handler for SIGALRM.
+ * @param[in] sig Signal number (ignored).
+ */
 static void sigalrm_handler(int sig)
 {
   ++SignalCounter.alrm;
 }
 
+/** Signal callback for SIGTERM.
+ * @param[in] ev Signal event descriptor.
+ */
 static void sigterm_callback(struct Event* ev)
 {
   assert(0 != ev_signal(ev));
@@ -53,6 +65,9 @@
   server_die("received signal SIGTERM");
 }
 
+/** Signal callback for SIGHUP.
+ * @param[in] ev Signal event descriptor.
+ */
 static void sighup_callback(struct Event* ev)
 {
   assert(0 != ev_signal(ev));
@@ -64,6 +79,9 @@
   rehash(&me, 1);
 }
 
+/** Signal callback for SIGINT.
+ * @param[in] ev Signal event descriptor.
+ */
 static void sigint_callback(struct Event* ev)
 {
   assert(0 != ev_signal(ev));
@@ -74,6 +92,7 @@
   server_restart("caught signal: SIGINT");
 }
 
+/** Register all necessary signal handlers. */
 void setup_signals(void)
 {
   struct sigaction act;
----------------------- End of diff -----------------------

Reply via email to