Comments (4)
Python needs stdin to be closed before it starts executing commands, just add process.close(reproc::stream::in);
after you've finished writing all the input and it'll work.
from reproc.
I added process.close as you told me, and it exits after the write, but my output string is empty... Furthermore, what if I wanted to keep sending input to the process, could I do it later?
from reproc.
I guess this means sending a newline just isn't sufficient to make the repl interpret the written input from stdin. We would need the correct character sequence to make the python repl progress further to make this work. I'm a bit sceptical whether this is a reproc specific problem. If this is something generic and the solution can be applied to more than just python, I'd be happy to include some helper function to 'flush' the output to the subprocess so it gets interpreted. I checked and we do write all the input correctly to the pipe so that shouldn't be a problem I think.
from reproc.
Closing this one as it's pretty old, feel free to comment if you're still having issues with this
from reproc.
Related Issues (20)
- I can't draw the rest of the owl HOT 2
- reproc_t doesn't contain signal and exit_code - it is unclear how can the user know when the process caughed signal or failed with exit_code!=0
- reproc::run fails with 'Invalid Argument' in Docker container HOT 5
- Reproc leaves child process as a zombie if it daemonizes
- Build Errors in reproc Package - Declaration Conflict with reproc++ (Required for zrhtym Installation) HOT 1
- GCC 13 fix deserves a point release.
- CMAKE FetchContent Build Error
- Ability in Windows to configure show console options and console title
- [win32] annoying popup with error, when terminatig process HOT 1
- Run command as sudo and forcefully close it HOT 3
- Extra Variables HOT 2
- Run a command with the pipe operator HOT 1
- GUI for players not visible on Windows HOT 2
- False positive process status being returned by process.poll() - Windows 11
- Build failure with gcc 13 HOT 7
- array move operator= is actually a copy HOT 4
- Lifetime with `drain` HOT 1
- Are there examples (is it possible) to run multiple processes in the background without threads? HOT 1
- The example poll.c suffers from the buffer overflow problem HOT 1
- REPROC_EVENT_ERR is never set (at least in the example poll.c)
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 reproc.