Paraslash Audio Streaming | |
About News Download Documentation Development |
Manage a list of fds that should be closed on fork. More...
#include <regex.h>
#include "para.h"
#include "list.h"
#include "string.h"
#include "close_on_fork.h"
Functions | |
void | add_close_on_fork_list (int fd) |
Add one file descriptor to the close-on-fork list. More... | |
void | del_close_on_fork_list (int fd) |
Delete one file descriptor from the close-on-fork list. More... | |
void | close_listed_fds (void) |
Close all fds in the list and destroy all list entries. More... | |
void | deplete_close_on_fork_list (void) |
Remove all listed fds from the close on fork list. More... | |
Manage a list of fds that should be closed on fork.
void add_close_on_fork_list | ( | int | fd | ) |
Add one file descriptor to the close-on-fork list.
fd | The file descriptor to add. |
References alloc().
Referenced by generic_com_on().
void del_close_on_fork_list | ( | int | fd | ) |
Delete one file descriptor from the close-on-fork list.
fd | The file descriptor to delete. |
Noop if fd does not belong to the close-on-fork list.
Referenced by generic_com_off(), and shutdown_client().
void close_listed_fds | ( | void | ) |
Close all fds in the list and destroy all list entries.
This function calls close(3) for each fd in the close-on-fork list and empties the list afterwards.
void deplete_close_on_fork_list | ( | void | ) |
Remove all listed fds from the close on fork list.
This is like close_listed_fds() but does not close the fds.