• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ueno / ruby-gpgme / 173
89%
master: 89%

Build:
Build:
LAST BUILD BRANCH: patch-1
DEFAULT BRANCH: master
Ran 21 Jan 2020 04:16PM UTC
Jobs 7
Files 22
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
173

Pull #135

travis-ci

web-flow
ctx: do not autoclose in `path_function`

The default callback for writing a password to GPGME takes a file
descriptor and needs to write the given password to it. By creating a
new `IO` object directly on the file descriptor, the object will take
ownership of it. This is a problem because the file descriptor passed to
this callback will be explicitly closed by GPGME, and eventually, the
`IO` allocated in `self.pass_function` will be garbage collected,
closing the file descriptor again.

Usually, closing a file descriptor that has already been closed results
in a silent `EBADFD`, but a serious race condition can happen if the
Kernel allocates the same file descriptor (e.g. through another `open`
call in another part of your Ruby program): when GC triggers, the
FD will be closed unexpectedly.

To prevent this, simply set `IO#autoclose = false` on the `IO` object:
the garbage collector will no longer close the file descriptor on
cleanup, so the descriptor will only be closed once (in the explicit
close call performed by us).
Pull Request #135: ctx: do not autoclose in `pass_function`

1 of 1 new or added line in 1 file covered. (100.0%)

1314 of 1480 relevant lines covered (88.78%)

78.99 hits per line

Jobs
ID Job ID Ran Files Coverage
1 173.1 (2.6) 21 Jan 2020 04:16PM UTC 0
88.73
Travis Job 173.1
2 173.2 (2.5) 21 Jan 2020 04:16PM UTC 0
88.79
Travis Job 173.2
3 173.3 (2.4) 21 Jan 2020 04:16PM UTC 0
88.79
Travis Job 173.3
4 173.4 (2.3) 21 Jan 2020 04:16PM UTC 0
88.79
Travis Job 173.4
5 173.5 (2.2) 21 Jan 2020 04:16PM UTC 0
88.76
Travis Job 173.5
6 173.6 (2.1) 21 Jan 2020 04:18PM UTC 0
88.82
Travis Job 173.6
7 173.7 (2.0) 21 Jan 2020 04:19PM UTC 0
88.82
Travis Job 173.7
Source Files on build 173
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #173
  • Pull Request #135
  • PR Base - master (#172)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc