Comments (5)
Probably also a duplicate of #2062 where the dup2 behavior interferes with the correct behavior of native libraries and uv_spawn also and that native libraries can corrupt libuv state (fwiw, Julia always passes in dup of stdio handles instead of 0,1,2 so that those issues do not occur)
from libuv.
Similar yeah. I guess my reason to think this one is slightly different is that we have dedicated functionality to interact with the outside world, but it has some iinteresting caveats.
from libuv.
We should reset orig_termios_fd if the tty handle is closed, since the fd will become invalid.
#4399 - imperfect but ceteris paribus an improvement
from libuv.
the internal orig_termios_fd reference will point to the duplicated fd, not the real one
To be clear, my recollection is that libuv then calls dup2 to destroy the original fd so that it can point to the "real" one not the duplicated one (which is the bug in #2062)
Secondly, should we add a uv_tty_capture_mode(uv_os_handle_t fd)
function, so that this applications can avoid having this code be conditional on whatever pty object first happens to used with it, and so the user could capture the state of fd 0 explicitly instead?
from libuv.
Not sure, I find the current behavior good, minus a specific case...
The PR Ben made solves it already, so I guess we can get more creative if / when we need to?
from libuv.
Related Issues (20)
- System freeze after suspending two instances of Neovim HOT 5
- test: test-thread-priority.c fails on Linux HOT 14
- windows uv_poll_init
- doc: improve example docs/code/progress/main.c HOT 1
- win: use WinDNS family of functions for DNS resolving HOT 4
- Improper Validation of Certificate Trust in certifi and dependent packages HOT 4
- 测试在Windows XP系统上运行时遇到RegGetValueW无法定位于ADVAPI32.dll的问题 HOT 4
- Provide an OS independent way to set/get UV_THREADPOOL_SIZE HOT 8
- Build currently failing on AIX and OS/400 (IBM i) HOT 7
- about test udp_multicast_join | udp_multicast_join6 not ok | not ok 180 - metrics_pool_events HOT 3
- uv_tcp_close_reset() needs to handle some additional errno other than EINVAL on NetBSD HOT 2
- setuid() does not drop all privileges due to io_uring (CVE-2024-22017) HOT 3
- android and Debian: uv_fs_event stops working when file is deleted HOT 3
- unit test watcher_cross_stop fail in wsl2 HOT 1
- build fail HOT 6
- If you attempt to send a UDP packet to an IPv4 address using an IPv6 socket, sendto() will report the WSAEFAULT error. HOT 9
- Missing symbols in the library file compared to the headers HOT 4
- Issue with GetSystemTimePreciseAsFileTime on Windows Server 2008 in libuv 1.48.0 and Suggested Fix HOT 1
- CMake build fails with FetchContent HOT 2
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 libuv.