It is possible when calling picocom via another program rather than directly
from the command line that it will be called without a controlling terminal
being defined. My circumstances were the expect program spawning picocom on a
pseudo-tty in order to talk to an external serial device.
When this happens the first serial port opened will be adopted as picocom's
controlling tty, and in the case of incorrect baudrate or junk data causes
picocom to die with SIGHUP or similar.
Adding O_NOCTTY to the serial port open flags corrects this problem. This will
be a NOOP in the 99.9% of cases where the user already has a controlling tty.
Patch attached.
Original issue reported on code.google.com by bob.dun...@xyzzy.org.uk on 7 Oct 2011 at 7:55
Original issue reported on code.google.com by
bob.dun...@xyzzy.org.uk
on 7 Oct 2011 at 7:55Attachments: