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

gevent / gevent / 2792
85%
master: 78%

Build:
Build:
LAST BUILD BRANCH: python-updates
DEFAULT BRANCH: master
Ran 15 Apr 2018 07:05PM UTC
Jobs 3
Files 75
Run time 15min
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
2792

push

travis-ci

jamadden
Use /dev/fd|/proc/self/fd to get open FDs to close in Popen

If those aren't available, use the old brute-force approach. This is
closer to what CPython does in its C implementation, and is much
faster.

We don't have to worry about the async signal safe stuff the C code
does because, guess what, we're running Python code here already
anyway, so much of it could wind up doing something that's not
actually safe anyway. Oh well.

Since we depend on Python 3.4 and above now, we can rely on the
CLOEXEC flag being set by default and not have to manually check
everything.

This speeds up 2.7 (close_fds defaults to *false* there, so the
default case doesn't change):

| Benchmark                 | 27_bench_subprocess | 27_bench_subprocess_dirfd     |
+---------------------------+---------------------+-------------------------------+
| spawn native no close_fds | 1.81 ms             | 1.79 ms: 1.01x faster (-1%)   |
| spawn gevent no close_fds | 2.11 ms             | 2.20 ms: 1.04x slower (+4%)   |
| spawn native close_fds    | 31.0 ms             | 30.2 ms: 1.03x faster (-3%)   |
| spawn gevent close_fds    | 31.6 ms             | 2.56 ms: 12.31x faster (-92%) |

And it really speeds up 3.7 (close_fds defaults to *true* there, so
the default case is much faster, and the non-default case is even better):

| Benchmark                 | 37_bench_subprocess | 37_bench_subprocess_dirfd     |
+---------------------------+---------------------+-------------------------------+
| spawn native no close_fds | 1.34 ms             | 1.27 ms: 1.06x faster (-6%)   |
| spawn gevent no close_fds | 117 ms              | 3.05 ms: 38.27x faster (-97%) |
| spawn native close_fds    | 1.36 ms             | 1.30 ms: 1.04x faster (-4%)   |
| spawn gevent close_fds    | 32.5 ms             | 3.34 ms: 9.75x faster (-90%)  |

Fixes #1172

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

9839 of 11642 relevant lines covered (84.51%)

1.98 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
37
100.0
src/gevent/subprocess.py
Jobs
ID Job ID Ran Files Coverage
1 2792.1 (TASK=test-py37) 15 Apr 2018 07:12PM UTC 0
68.72
Travis Job 2792.1
2 2792.2 (TASK=test-py27) 15 Apr 2018 07:05PM UTC 0
63.35
Travis Job 2792.2
4 2792.4 (TASK=test-py36) 15 Apr 2018 07:21PM UTC 0
68.71
Travis Job 2792.4
Source Files on build 2792
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2792
  • 461d6966 on github
  • Next Build on issue1172 (#2794)
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