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

ueno / ruby-gpgme / 174
89%

Build:
DEFAULT BRANCH: master
Ran 25 Jan 2020 06:42AM 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
174

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

1314 of 1480 relevant lines covered (88.78%)

79.0 hits per line

Jobs
ID Job ID Ran Files Coverage
1 174.1 (2.6) 25 Jan 2020 06:42AM UTC 0
88.73
Travis Job 174.1
2 174.2 (2.5) 25 Jan 2020 06:42AM UTC 0
88.79
Travis Job 174.2
3 174.3 (2.4) 25 Jan 2020 06:42AM UTC 0
88.79
Travis Job 174.3
4 174.4 (2.3) 25 Jan 2020 06:42AM UTC 0
88.79
Travis Job 174.4
5 174.5 (2.2) 25 Jan 2020 06:42AM UTC 0
88.76
Travis Job 174.5
6 174.6 (2.1) 25 Jan 2020 06:44AM UTC 0
88.82
Travis Job 174.6
7 174.7 (2.0) 25 Jan 2020 06:44AM UTC 0
88.82
Travis Job 174.7
Source Files on build 174
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #174
  • 64af9cad on github
  • Prev Build on master (#172)
  • Next Build on master (#177)
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