Hacker News new | past | comments | ask | show | jobs | submit login

I'd expect the ^C to immediately kill the connection. It sends a SIGHUP, which indicates the serial line has been disconnected. (Based on the DCD line, per Wikipedia.)

Btw, nice work on sway.




> I'd expect the ^C to immediately kill the connection. It sends a SIGHUP, which indicates the serial line has been disconnected.

you're ignoring the actual line transfer of the control C up the wire from the keyboard, through various buffers and such..

not a serial guru by any means, so I could be wrong about the specifics, but if you've ever used a serial terminal, you'll know OP is correct.


I'd think the ^C would be transmitted by a physical disconnect, i.e. changing the state of the DCD line. The DCD disconnect should immediately trigger an interrupt, which should trigger a SIGHUP.

To be fair, though, I can't say I've used a proper serial terminal.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: