diff options
author | Simon Josefsson <simon@josefsson.org> | 2024-10-09 14:53:47 +0200 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2024-10-09 14:53:49 +0200 |
commit | 773955959c2cdb872a39a4809fc07ccb5563a177 (patch) | |
tree | 8da1ea0dd97f7c9bf7a8c012e897bde1dd68c1c2 /git2cl | |
parent | a2df31a82514a0cf521c14a27033971a9a5de820 (diff) | |
download | git2cl-773955959c2cdb872a39a4809fc07ccb5563a177.zip git2cl-773955959c2cdb872a39a4809fc07ccb5563a177.tar.gz git2cl-773955959c2cdb872a39a4809fc07ccb5563a177.tar.bz2 |
Don't select(stdin) to decide pipe or call.
Report by Arthur de Jong <adejong@debian.org> in
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=697475
Diffstat (limited to 'git2cl')
-rwxr-xr-x | git2cl | 10 |
1 files changed, 1 insertions, 9 deletions
@@ -92,13 +92,6 @@ my %month = ( my $fh = new FileHandle; -sub key_ready -{ - my ($rin, $nfd); - vec($rin, fileno(STDIN), 1) = 1; - return $nfd = select($rin, undef, undef, 0); -} - sub strptime { my $str = shift; return undef if not defined $str; @@ -323,9 +316,8 @@ $state = 0; # if reading from STDIN, we assume that we are # getting git log as input -if (key_ready()) +if (-f STDIN or -l STDIN or -p STDIN) { - #my $dummyfh; # don't care about writing #($fh,$dummyfh) = FileHandle::pipe; $fh->fdopen(*STDIN, 'r'); |