Comments (10)
It seems that the problem might be some race condition, since this works:
$ rspec ./spec/io_spec.rb
..........
Finished in 0.79139 seconds (files took 0.07509 seconds to load)
10 examples, 0 failures
from childprocess.
Ah, forgot to include the CHILDPROCESS_POSIX_SPAWN=true
, so it doesn't work indeed.
from childprocess.
This was the last successful build:
https://travis-ci.org/github/enkessler/childprocess/jobs/687662868
and this is where the issue first appeared:
https://travis-ci.org/github/enkessler/childprocess/jobs/698756797
from childprocess.
So the cat: -: Resource temporarily unavailable
is reported from here:
childprocess/lib/childprocess/unix/posix_spawn_process.rb
Lines 51 to 58 in c626073
called from here:
Lines 114 to 116 in c626073
Checking what was changed in Ruby, this is susceptible commit:
But that might be completely false lead 😇
from childprocess.
This seems to be the root cause, the change from RUBY_PIPE_NONBLOCK_DEFAULT
, which was 0
, to O_NONBLOCK
. I have locally replaced the O_NONBLOCK
by 0
and the test suite passes.
Unfortunately, other test case fails then:
1) ChildProcess lets a detached child live on
Failure/Error: expect(alive?(c_pid)).to be true
expected true
got false
# ./spec/childprocess_spec.rb:214:in `block (2 levels) in <top (required)>'
from childprocess.
I have reported this against Ruby:
https://bugs.ruby-lang.org/issues/17607
from childprocess.
I wonder if #172 / #175 might solve this. At least CHILDPROCESS_UNSET=should-be-unset bundle exec rake
passes for me on that PR with Ruby 3.0.0.
from childprocess.
Confirmed that #175 (comment) actually fixes the CI on ruby-head (the only ruby-head CI failing is then due to installing FFI, which is unrelated and no longer needed with that PR).
from childprocess.
Thx, the test suite passes with #175. Nevertheless, I'd still like to also understand the reasons why it started to fail, although it will have smaller priority 😇
from childprocess.
Closed by #175.
from childprocess.
Related Issues (20)
- Redirect to IO.pipe on Windows causes inability to start a process HOT 6
- Security Question: Is there a reason childprocess is released as an unsigned gem? HOT 2
- FFI is a required pre-requisite HOT 4
- Pipe i/o example in documentation is incorrect HOT 2
- Erro ao rodar o comando rspec -fd HOT 1
- childprocess kills detached windows process on exit HOT 4
- FFI is a required pre-requisite for Windows or posix_spawn support in the ChildProcess gem. HOT 1
- A backend based on Process.spawn HOT 12
- code hanging attempting to @thread.join HOT 1
- Should work for the M1 chip, but needs to be mapped or smth
- `host_cpu` changes between Ruby 2.7.2 and 2.7.3 HOT 2
- FFI installes but rake test get error HOT 4
- cannot load such file -- ffi (LoadError) HOT 2
- Use with StringIO HOT 1
- posix_spawn is not yet supported on aarch64-linux (aarch64-linux), HOT 2
- posix_spawn is not yet supported on sparc-solaris (sparc-solaris2.11) HOT 1
- I happen to be having this error after even having all both ruby, gem, and even chocolatey handy HOT 2
- Test suite is going to be broken with Ruby 3.3 HOT 1
- differences between macos and linux HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from childprocess.