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

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

Build:
DEFAULT BRANCH: master
Ran 25 Jan 2020 06:44AM UTC
Files 22
Run time 1s
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

25 Jan 2020 06:40AM UTC coverage: 88.822% (-0.06%) from 88.881%
2.0

push

travis-ci

dansketcher
ctx: do not autoclose in `path_function` (#135)

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).

1335 of 1503 relevant lines covered (88.82%)

11.4 hits per line

Source Files on job 174.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 171
  • Travis Job 174.7
  • 64af9cad on github
  • Prev Job for 2.0 on master (#172.7)
  • Next Job for 2.0 on master (#177.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

© 2025 Coveralls, Inc