fs/devices — PTY subsystem, separate stdio nodes, nonblocking stdin#747
Closed
wdcui wants to merge 1 commit intowdcui/stacked/pr6-mm-address-spacefrom
Closed
fs/devices — PTY subsystem, separate stdio nodes, nonblocking stdin#747wdcui wants to merge 1 commit intowdcui/stacked/pr6-mm-address-spacefrom
wdcui wants to merge 1 commit intowdcui/stacked/pr6-mm-address-spacefrom
Conversation
4722328 to
2a84033
Compare
…n, and device status flags Add full pseudo-terminal (PTY) support with PtyManager, PtyPair shared state, master/slave ring buffers, and line discipline processing (ICRNL, ECHO, ONLCR). PTY operations (get/set termios, foreground pgrp) are inherent methods on devices::FileSystem rather than trait methods, since they are too device-specific for the generic FileSystem trait. Other changes: - Separate NodeInfo constants for stdin/stdout/stderr (distinct ino) - Add /dev/tty (controlling terminal) routing reads to stdin, writes to stdout - Nonblocking stdin support via platform read_from_stdin_nonblocking - StdinPollable, PtyMasterPollable, PtySlavePollable for epoll/poll/select - DeviceStatusFlags for per-entry O_NONBLOCK tracking - Manual FdEnabledSubsystemEntry with on_dup/on_close for PTY refcounting - Implement *_at stubs (NotADirectory), fd_path, rename, set_open_status_flags - /dev and /dev/pts directory stat support - Proper error returns instead of unimplemented!() in open() and read() - Zero-length read/write guards for PTY paths
51b46e1 to
4fcc29b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Full device filesystem overhaul adding pseudo-terminal (PTY) support and improving existing device handling.
Stacked PR 7 of N — targets
wdcui/stacked/pr6-mm-address-space(PR #746).Key changes
PtyManager,PtyPairshared state with master↔slave ring buffers, line discipline (ICRNL, ECHO, ONLCR), reference-counted open FDs with HUP notifications/dev/tty: Controlling terminal device that reads from stdin, writes to stdoutO_NONBLOCKviaread_from_stdin_nonblockingStdinPollable,PtyMasterPollable,PtySlavePollablefor epoll/poll/selectDeviceStatusFlags: Per-entry status flag tracking (O_NONBLOCKetc.)FdEnabledSubsystemEntry: Customon_dup/on_closefor PTY refcount management across dup/fork*_atstubs: All fd-relative methods returnNotADirectory(devices aren't directories)/devand/dev/ptspaths return directory-styleFileStatusopen()andread()instead ofunimplemented!()Design decisions
get_pty_termios,set_pty_termios,get_pty_foreground_pgrp,set_pty_foreground_pgrp) are inherent methods ondevices::FileSystem, not on theFileSystemtrait — they're too device-specific for the generic trait interfaceStats
1 file changed, 872 insertions(+), 86 deletions(-)