From 899b89a8c2faee55128db392cdb426e08e2289e7 Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Wed, 23 Dec 2009 15:06:38 +0000 Subject: booster/fcntl: implement F_GETFD and F_SETFD. Signed-off-by: Raghavendra G Signed-off-by: Anand V. Avati BUG: 446 (apache does not start in daemon mode on fedora core 11.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=446 --- booster/src/booster-fd.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'booster/src/booster-fd.h') diff --git a/booster/src/booster-fd.h b/booster/src/booster-fd.h index a870852339..dd6d00d5c9 100644 --- a/booster/src/booster-fd.h +++ b/booster/src/booster-fd.h @@ -43,15 +43,26 @@ struct _fd { }; typedef struct _fd fd_t; +struct _booster_fd_set { + unsigned long fd_bits[0]; +}; +typedef struct _booster_fd_set booster_fd_set_t; struct _booster_fdtable { - int refcount; - unsigned int max_fds; - gf_lock_t lock; + booster_fd_set_t *close_on_exec; + int refcount; + unsigned int max_fds; + gf_lock_t lock; fd_t **fds; }; typedef struct _booster_fdtable booster_fdtable_t; +void +booster_set_close_on_exec (booster_fdtable_t *fdtable, int fd); + +int +booster_get_close_on_exec (booster_fdtable_t *fdtable, int fd); + extern int booster_fd_unused_get (booster_fdtable_t *fdtable, fd_t *fdptr, int fd); -- cgit