Subject: | new(input => ...) doesn't behave right. |
with git version 1.7.2.1, I am seeing a failure for the test suite on t/20-simple on the last 2
tests. Strangeley, it's mis-behaving on centos 3,4 but not 5. I'm running on perl 5.12.1 on
centos 3.
This is an example of the failure which appears to also be present on Mac.
http://www.cpantesters.org/cpan/report/8d6b9316-aae0-11df-8246-59ba6e8696e0
The test is failing with a SIGPIPE failure when "rev-parse --git-dir" is called. Because the
object was created with an input hash value, ALL calls to run are going to try to pass this
input to the run. I don't think this is what you were intending.
That aside, when you call open3 in Git::Reppository::Command->new, we're not
1 checking for a valid pid
2. Somehow handling $SIG{'PIPE'} if CHILD_IN is closed by git.
open3 docs state:
If the child process dies for any reason, the next write to CHLD_IN is likely to generate a
SIGPIPE in the parent, which is fatal by default. So you may wish to handle this signal.
I do not think that in the failure cases, the program is going wrong so much as that we're
seeing a difference between platforms on how libc requires stdin to be closed before a
program can exit.