aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorhttp://www.cse.unsw.edu.au/~willu/ <http://www.cse.unsw.edu.au/~willu/@web>2008-07-18 21:03:55 -0400
committerJoey Hess <joey@kitenet.net>2008-07-18 21:03:55 -0400
commit15fb518cc2bc38a510b54003b59e0152c28c0eec (patch)
treec24e816acbb1370b1b2535344ee8017feff51d8f /doc
parent64295da8aff69aec7bf7fd4df6225e67c894635e (diff)
downloadikiwiki-15fb518cc2bc38a510b54003b59e0152c28c0eec.tar
ikiwiki-15fb518cc2bc38a510b54003b59e0152c28c0eec.tar.gz
New bug and patch - close stderr when forking a sub process to run git
Diffstat (limited to 'doc')
-rw-r--r--doc/bugs/git_stderr_output_causes_problems.mdwn16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/bugs/git_stderr_output_causes_problems.mdwn b/doc/bugs/git_stderr_output_causes_problems.mdwn
new file mode 100644
index 000000000..155808884
--- /dev/null
+++ b/doc/bugs/git_stderr_output_causes_problems.mdwn
@@ -0,0 +1,16 @@
+I've just been getting ikiwiki running on a hosted server. The server is wrapping all cgi scripts to 'harden' them. Unfortunately, that script is sensitive to what a cgi script outputs on stderr.
+
+Ikiwiki's git handling is sending a bunch of output to stderr. The following patch closes stderr in the child process that ikiwiki forks to run git. This allows me to use ikiwiki on this hosted server. (patch inline - check source to get it)
+
+diff --git a/IkiWiki/Rcs/git.pm b/IkiWiki/Rcs/git.pm
+index 425536f..5734bb2 100644
+--- a/IkiWiki/Rcs/git.pm
++++ b/IkiWiki/Rcs/git.pm
+@@ -24,6 +24,7 @@ sub _safe_git (&@) { #{{{
+ if (!$pid) {
+ # In child.
+ # Git commands want to be in wc.
++ open STDERR, '>/dev/null';
+ chdir $config{srcdir}
+ or error("Cannot chdir to $config{srcdir}: $!");
+ exec @cmdline or error("Cannot exec '@cmdline': $!");