Comments (6)
I took a run at it with the debugger and it seems to hang in
Line 208 in 1331743
from libtmux.
Is this possibly the problem? https://stackoverflow.com/questions/1445627/how-can-i-find-out-why-subprocess-popen-wait-waits-forever-if-stdout-pipe
Some more stuff https://stackoverflow.com/questions/30982217/python-popen-wait-vs-communicate-vs-calledprocesserror
from libtmux.
The following patch appears to work
diff --git a/libtmux/common.py b/libtmux/common.py
index 9681d3e..64f4313 100644
--- a/libtmux/common.py
+++ b/libtmux/common.py
@@ -205,11 +205,7 @@ class tmux_cmd(object):
self.process = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE
)
- self.process.wait()
- stdout = self.process.stdout.read()
- self.process.stdout.close()
- stderr = self.process.stderr.read()
- self.process.stderr.close()
+ stdout, stderr = self.process.communicate()
returncode = self.process.returncode
except Exception as e:
logger.error('Exception for %s: \n%s' % (subprocess.list2cmdline(cmd), e))
from libtmux.
I have the same problem, reading a history of 1800 lines with buffer.
I will test for a days, and I will create a PR
Seems to work , justified improvement
from libtmux.
Merged #297. Fix is in 0.8.5
https://libtmux.git-pull.com/history.html#libtmux-0-8-5-2020-10-25
pip install --user -U libtmux
Better now?
@gil-obradors @deliciouslytyped
(assuming you are still using libtmux, @deliciouslytyped, I apologize for the delay!)
from libtmux.
Many thanks @tony !
from libtmux.
Related Issues (20)
- fetch_objs breaks when buffer_sample contains pipe symbol |
- The parse of list-panes output breaks when the screen buffer contains pipe symbol HOT 6
- Tests failing on ppc64le HOT 2
- Tests failing on aarch64 HOT 2
- Tests failing on armv7l HOT 3
- Intermittent errors with tests on x86_64 / amd64 HOT 7
- Intermittent errors with tests on i586 (32bit)
- Is there any way to connect to a tmux session on a remote machine? HOT 1
- Intermittent / flaky test test_capture_pane
- select_pane not working correctly with multiple sessions HOT 2
- Drop Python 3.7 HOT 1
- `build(build-system)`: Remove `setuptools` build dependency
- unknown pytest option --doctest-docutils-modules HOT 7
- Unable to access server via WSGI HOT 4
- `TmuxObjectDoesNotExist` when creating `libtmux.Server().new_session(attach=True)` HOT 13
- Remove assert from __eq__ for windows HOT 5
- Tests failing with "FileNotFoundError: [Errno 2]" and "Unknown directive type: 'currentmodule' [myst.directive_unknown]" HOT 6
- Tests: Snapshots
- Options: Typed structures
- Environment: Add to `new-window`, `split-window`, `respawn-window`, `respawn-pane`
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 libtmux.