Skip to content

IOError: [Errno 9] Bad file descriptor when running shcov on Mac OSX #8

@GoogleCodeExporter

Description

@GoogleCodeExporter
What steps will reproduce the problem?
1. echo -e '#!/bin/bash\necho "Some test message"\n' > test.sh
2. chmod +x test.sh
3. ./shcov test.sh

What is the expected output? What do you see instead?
I expected to get 'Some test message'. What I got was that and a traceback.

What version of the product are you using? On what operating system?
commit 3c3e16a0b49eb4b695107f842b5d7b387b70e5ab
Mac OSX 10.6.8
Python 2.7.6

Please provide any additional information below.

The error doesn't seem to be file related, because if I give it a non-existent 
file is throws the same traceback. This works on a RHEL6 system I have 
elsewhere.

$ cat test.sh
#!/bin/bash
echo "Some test message"

$ ./shcov test.sh
Traceback (most recent call last):
  File "./shcov", line 176, in <module>
    out = sc.parse_output()
  File "./shcov", line 109, in parse_output
    self.process.stderr.flush()
IOError: [Errno 9] Bad file descriptor
Some test message

$ ./shcov jfdkls
Traceback (most recent call last):
  File "./shcov", line 176, in <module>
    out = sc.parse_output()
  File "./shcov", line 109, in parse_output
    self.process.stderr.flush()
IOError: [Errno 9] Bad file descriptor

$ ./shcov --help;
Usage: shcov [-h] [--output=where] [--shell=what] script...

Produce coverage data for 'script'. Options are

  --output=where  write data to 'where' instead of /tmp/shcov
  --shell=what    ues 'what' (including arguments) as shell instead of 'bash -x'


Original issue reported on code.google.com by [email protected] on 14 Feb 2014 at 5:28

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions