aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Bühler <stbuehler@web.de>2008-07-20 23:18:26 +0200
committerStefan Bühler <stbuehler@web.de>2008-07-20 23:18:26 +0200
commit8a82a625288bf9668c61a3b3f3ca0f86e603b013 (patch)
tree57c9a731c854357cbd150dc8cffc199f64e37db2
parentb9b8fcd563d661e96c75efb20e5c09bb5226e3f9 (diff)
downloadspawn-fcgi2-8a82a625288bf9668c61a3b3f3ca0f86e603b013.tar.gz
spawn-fcgi2-8a82a625288bf9668c61a3b3f3ca0f86e603b013.zip
Some comments
-rw-r--r--spawn-fcgi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/spawn-fcgi.c b/spawn-fcgi.c
index f67f71a..3789487 100644
--- a/spawn-fcgi.c
+++ b/spawn-fcgi.c
@@ -75,7 +75,7 @@ typedef struct {
gchar *pid_file;
gboolean no_fork;
gboolean show_version;
- gboolean keep_fds, close_fds; /* keep/close STDIN/STDOUT */
+ gboolean keep_fds, close_fds; /* keep/close STDOUT/STDERR */
gchar *chroot;
gchar *uid, *gid;
@@ -347,6 +347,7 @@ int drop_priv() {
return 0;
}
+/* move a fd to another and close the old one */
void move2fd(int srcfd, int dstfd) {
if (srcfd != dstfd) {
close(dstfd);
@@ -355,6 +356,7 @@ void move2fd(int srcfd, int dstfd) {
}
}
+/* replace an fd with /dev/null */
void move2devnull(int fd) {
move2fd(open("/dev/null", O_RDWR), fd);
}