Subject: | child process should untie i/o handles |
After forking, inherited file descriptors may have and retain unwanted
side-effects if tied. For example, when used in a FastCGI script, any
run will die with: "Not a GLOB reference at /usr/lib/perl5/FCGI.pm line
125."
Attached patch fixes this issue.
Subject: | 0001-child-process-should-untie-i-o-handles.patch |
diff -ur Text-VimColor-0.11/lib/Text/VimColor.pm Text-VimColor-0.11-shiar/lib/Text/VimColor.pm
--- Text-VimColor-0.11/lib/Text/VimColor.pm
+++ Text-VimColor-0.11-shiar/lib/Text/VimColor.pm
@@ -388,6 +388,7 @@ sub _run
else {
defined $pid
or croak "error forking to run $prog: $!";
+ tied $_ and untie $_ for *STDOUT, *STDERR, *STDIN;
open STDIN, '/dev/null';
open STDOUT, '>/dev/null';
open STDERR, '>&=' . fileno($err_fh)