Characters not making it from a master to a slave pseudo-terminal Characters not making it from a master to a slave pseudo-terminal unix unix

Characters not making it from a master to a slave pseudo-terminal


0x04 is ^D, which is the end-of-file keypress. Has the pty been set in raw mode? Maybe the driver is eating it.

If you make it:

os.write(child_fd, b"'\x04hmm\x16\x04'\n")

you can see that indeed the driver is doing translation. \x16 is the same as ^V, which is how you quote things. It makes sense the translation would only be happening from the master (the pretend physical terminal) and the slave. The pretend physical terminal is where (on a normal terminal device) the person would be typing

I'm not sure how to get the driver to stop doing that. If the child sets its terminal to raw mode then that will likely do it.