/*
- * Copyright (C) 2005-2006 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005-2008 Andre Noll <maan@systemlinux.org>
*
* 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"
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)
{
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.
*/
}
/**
- * 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)
{