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

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

Build:
Build:
LAST BUILD BRANCH: patch-1
DEFAULT BRANCH: master
Ran 21 Jan 2020 04:19PM UTC
Files 22
Run time 2s
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

21 Jan 2020 04:13PM UTC coverage: 88.822% (-0.06%) from 88.881%
2.0

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`

1335 of 1503 relevant lines covered (88.82%)

11.4 hits per line

Source Files on job 173.7 (2.0)
  • Tree
  • List 0
  • Changed 4
  • Source Changed 1
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 170
  • Travis Job 173.7
  • cd0db6cd on github
  • Prev Job for 2.0 on vmg/autoclose (#172.7)
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