Skip to content

Commit 1337d40

Browse files
committed
no fsync
1 parent 919516b commit 1337d40

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

src/bittty/pty/unix.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,12 @@ def preexec_fn():
121121

122122
def flush(self) -> None:
123123
"""
124-
Flush output using os.fsync() for real PTY file descriptor.
124+
PTY master file descriptors don't support fsync - data flows immediately.
125125
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.
126+
For Unix PTYs, data written to the master side appears immediately
127+
on the slave side, so no explicit flushing is needed.
129128
"""
130-
os.fsync(self.master_fd)
129+
pass
131130

132131
async def read_async(self, size: int = constants.DEFAULT_PTY_BUFFER_SIZE) -> str:
133132
"""

0 commit comments

Comments
 (0)