* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* Please read the file COPYING, README and AUTHORS for more information.
- *
- * I/O abstraction interface header
- *
- * $Id: io.h,v 1.2 2005/07/09 20:22:29 fw Exp $
*/
-#ifndef io_H_inclucded
+#ifndef io_H_included
#define io_H_included
+/**
+ * @file
+ * I/O abstraction interface (header)
+ */
+
#include "portab.h"
#include <sys/time.h>
#define IO_WANTREAD 1
#define IO_WANTWRITE 2
-/* init library. sets up epoll/kqueue descriptors and tries to allocate space for ioevlen file descriptors.
- ioevlen is just the _initial_ size, not a limit. */
+/* init library.
+ sets up epoll/kqueue descriptors and tries to allocate space for ioevlen
+ file descriptors. ioevlen is just the _initial_ size, not a limit. */
bool io_library_init PARAMS((unsigned int ioevlen));
/* shutdown and free all internal data structures */
/* set O_NONBLOCK */
bool io_setnonblock PARAMS((int fd));
+/* set O_CLOEXEC */
+bool io_setcloexec PARAMS((int fd));
+
/* watch fds for activity */
int io_dispatch PARAMS((struct timeval *tv));