summaryrefslogtreecommitdiffstats
path: root/booster/src/booster-fd.h
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2009-12-23 15:08:04 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-01-23 01:56:57 -0800
commit18404ac45271f8b0043652033e49236af4f62742 (patch)
treef364f3ae0a5a5464cb06b561e2afd5d8b0bd404b /booster/src/booster-fd.h
parent5f73c75c60841d8173f896b80432286c6458d853 (diff)
booster/fcntl: implement F_GETFD and F_SETFD.
Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> 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
Diffstat (limited to 'booster/src/booster-fd.h')
-rw-r--r--booster/src/booster-fd.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/booster/src/booster-fd.h b/booster/src/booster-fd.h
index a87085233..dd6d00d5c 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);