3 ms·
This is probably a stupid question, but doesn't the PTY itself already have that out-of-order problem? I mean that it reads both file descriptors and does inter
by gourlaysama 8y ago
This is probably a stupid question, but doesn't the PTY itself already have that out-of-order problem? I mean that it reads both file descriptors and does interleave them in the end. If it didn't they could still colorize things after the PTY.
So I guess my question is, why can't whatever it does to handle the ordering and merge the two be replicated in a small program that reads two names pipes and does the same but with extra colorizing?
- basicer 8y agoNot normally, no. The file descriptors sort of act like pointers. During normal execution in a pty, stdrr and stdout both point to the same device with the same buffer. Nothing is handling the order because there is only one buffer being written to.
- gourlaysama 8y ago> Nothing is handling the order because there is only one buffer being written to. Ah, that's what I was missing. Thank you, that makes sense.