summaryrefslogtreecommitdiffstats
path: root/booster/src/booster-fd.h
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2009-12-23 15:06:38 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-01-23 11:07:09 -0800
commit899b89a8c2faee55128db392cdb426e08e2289e7 (patch)
tree737430525813b5bfb517e463ca70cea7f7fb6245 /booster/src/booster-fd.h
parentda505a63c12ea9be0e783711547fe7bbfecf05ea (diff)
booster/fcntl: implement F_GETFD and F_SETFD.v3.0.1rc5
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 a8708523398..dd6d00d5c97 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);