Hacker News new | ask | show | jobs
by compsciphd 30 days ago
why could you not implement it as ptys.

Currently the terminal doesn't really process input itself, it just gives the program running the "raw" fd.

If instead the terminal gave the processes a pipe (for instance) and consumed all the pty input itself (and its end of the pipe being a buffer of that content), why wouldn't it be the same?

1 comments

pipes buffer, and you don't know when the child is actually reading? (Maybe you could cook something up with ptrace, since it would be a blocking read in this case...)