aboutsummaryrefslogtreecommitdiff
path: root/git2cl
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2024-10-09 14:53:47 +0200
committerSimon Josefsson <simon@josefsson.org>2024-10-09 14:53:49 +0200
commit773955959c2cdb872a39a4809fc07ccb5563a177 (patch)
tree8da1ea0dd97f7c9bf7a8c012e897bde1dd68c1c2 /git2cl
parenta2df31a82514a0cf521c14a27033971a9a5de820 (diff)
downloadgit2cl-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-xgit2cl10
1 files changed, 1 insertions, 9 deletions
diff --git a/git2cl b/git2cl
index dcea523..2fb3290 100755
--- a/git2cl
+++ b/git2cl
@@ -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');