We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 919516b commit 1337d40Copy full SHA for 1337d40
1 file changed
src/bittty/pty/unix.py
@@ -121,13 +121,12 @@ def preexec_fn():
121
122
def flush(self) -> None:
123
"""
124
- Flush output using os.fsync() for real PTY file descriptor.
+ PTY master file descriptors don't support fsync - data flows immediately.
125
126
- More efficient than generic flush() - ensures data is written through
127
- to the terminal device, not just buffered. Important for interactive
128
- terminal responsiveness.
+ For Unix PTYs, data written to the master side appears immediately
+ on the slave side, so no explicit flushing is needed.
129
130
- os.fsync(self.master_fd)
+ pass
131
132
async def read_async(self, size: int = constants.DEFAULT_PTY_BUFFER_SIZE) -> str:
133
0 commit comments