aft.c: Move definition of "buf" down a bit.
[paraslash.git] / close_on_fork.c
index 74b419483ac78bb68115f20e40889cb5f4eb4862..4f7c2b955a4d9f1404386f57b8246b803115a2bf 100644 (file)
@@ -1,22 +1,10 @@
 /*
- * Copyright (C) 2005-2006 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005-2008 Andre Noll <maan@systemlinux.org>
  *
- *     This program is free software; you can redistribute it and/or modify
- *     it under the terms of the GNU General Public License as published by
- *     the Free Software Foundation; either version 2 of the License, or
- *     (at your option) any later version.
- *
- *     This program is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- *
- *     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., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Licensed under the GPL v2. For licencing details see COPYING.
  */
 
-/** \file close_on_fork.c manage a list of fds that should be closed on fork */
+/** \file close_on_fork.c Manage a list of fds that should be closed on fork. */
 #include "para.h"
 #include "list.h"
 #include "string.h"
@@ -25,21 +13,21 @@ static struct list_head close_on_fork_list;
 static int initialized;
 
 /**
- * describes an element of the close-on-fork list
+ * Describes an element of the close-on-fork list.
  *
  * \sa list.h
  */
 struct close_on_fork {
-       /** the file descriptor which should be closed after fork() */
+       /** The file descriptor which should be closed after fork(). */
        int fd;
-       /** the position in the close-on-fork list */
+       /** The position in the close-on-fork list. */
        struct list_head node;
 };
 
 /**
- * add one file descriptor to the close-on-fork list
+ * Add one file descriptor to the close-on-fork list.
  *
- * \param fd the file descriptor to add
+ * \param fd The file descriptor to add.
  */
 void add_close_on_fork_list(int fd)
 {
@@ -50,14 +38,13 @@ void add_close_on_fork_list(int fd)
                initialized = 1;
        }
        cof->fd = fd;
-       list_add(&cof->node, &close_on_fork_list);
+       para_list_add(&cof->node, &close_on_fork_list);
 }
 
-
 /**
- * delete one file descriptor from the close-on-fork list
+ * Delete one file descriptor from the close-on-fork list.
  *
- * \param fd the file descriptor to delete
+ * \param fd The file descriptor to delete.
  *
  * Noop if \a fd does not belong to the close-on-fork list.
  */
@@ -76,7 +63,7 @@ void del_close_on_fork_list(int fd)
 }
 
 /**
- * call close(3) for each fd in the close-on-fork list
+ * Call close(3) for each fd in the close-on-fork list.
  */
 void close_listed_fds(void)
 {