Closed GoogleCodeExporter closed 8 years ago
Well, second-tst.sh just uses /bin/sh as hash bang. Is /bin/sh bash on your
system? shcov only works with bash.
Original comment by simon.ka...@gmail.com
on 18 May 2011 at 6:43
yes, I'm using bash shell. I have this error when I run the script with shcov
command.
Thank you.
Original comment by chris.au...@gmail.com
on 18 May 2011 at 4:46
me,too
Original comment by 307230...@qq.com
on 23 Sep 2011 at 6:32
Me three. I think it's when the script under test redirects stdin/stdout and
uses here documents.
Original comment by JohnSarg...@gmail.com
on 1 Nov 2011 at 4:24
I am getting the same issue.
Original comment by verma...@gmail.com
on 12 Jan 2012 at 11:29
Is anybody having solution for the above issue.or workaround...
Original comment by verma...@gmail.com
on 12 Jan 2012 at 11:32
i got the same error, it looks like, if the shell scripts contains any "echo"
it throws " echo: write error: Bad file descriptor", without echo statement the
coverager tool works fine, i wonder how they publish the code without any doing
formal testing
Original comment by anish2g...@gmail.com
on 18 Jan 2012 at 8:50
I still can't reproduce this on my system, so I'm guessing it's tied to some
version of bash.
And as for "they" publishing the code: This is one of my hobby projects. I
wrote it because it's a fun way to pass some time on an interesting problem,
and published the source on the internet. I haven't done formal testing on
multiple systems etc, simply because I have better/more fun things to do with
my spare time.
Original comment by simon.ka...@gmail.com
on 18 Jan 2012 at 11:03
I get error on the following platform
Red Hat Enterprise Linux Server release 5.3
GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.
[root@btovm491 tests]# ./hash_bang.sh
./hash_bang.sh: line 3: echo: write error: Bad file descriptor
./hash_bang.sh: line 4: echo: write error: Bad file descriptor
Original comment by veerarag...@gmail.com
on 18 Jan 2012 at 11:41
to the owner, are this issue are going to fixed ?
Original comment by anish2g...@gmail.com
on 20 Feb 2012 at 3:55
Maybe. I don't work actively on shcov though, so I can't give any promises.
Original comment by simon.ka...@gmail.com
on 20 Feb 2012 at 7:17
Folks, I was able to remove this issue by modifying the following line in the
'shcov' script:
From:
self.process = subprocess.Popen( self.shell + self.args, stdin = sys.stdin, stdout = sys.stdout, stderr = subprocess.PIPE)
To:
self.process = subprocess.Popen( self.shell + self.args,
stderr = subprocess.PIPE)
Basically, removing the redirect for stdin and stdout (letting Python defaults
take effect). Hope this helps someone!
@Simon - thanks, for a side project, this is awesome and definitely fills a
need in the shell script dev community.
Original comment by pmular...@gmail.com
on 11 Sep 2012 at 5:55
Fixed in commit r71, thanks pmularien!
Thanks for the encouraging words, however I don't think I'll continue with
shcov. Over the last two years or so, I've spent much more time on a code
coverage tool for compiled code, kcov (http://simonkagstrom.github.com/kcov/),
which is more useful for me and also more fun to work on :-)
Original comment by simon.ka...@gmail.com
on 11 Sep 2012 at 7:17
Original issue reported on code.google.com by
chris.au...@gmail.com
on 16 May 2011 at 9:23