termios.h defines
#define TIOCM_OUT1 0x2000
#define TIOCM_OUT2 0x4000
but what are the flags good for?
termios.h defines
#define TIOCM_OUT1 0x2000
#define TIOCM_OUT2 0x4000
but what are the flags good for?
TIOCM_OUT1 = Unassigned Programmable Output #1
TIOCM_OUT2 = Unassigned Programmable Output #2
It looks like they can be used to set the OUT1 and OUT2 bits in the MCR.
But what are the Unassigned Programmable Outputs good for?
My best understanding is they are used during loopback mode for interrupts and are best NOT used for anything (since they are intended to be used internally).
They are used as signal lines similar to DTR, et al. They are "unassigned" and therefore open for use. So theoretically you could use them to signal some special condition out of band, which could come in very handy.
However, I would not use them for anything unless you are building your own hardware solution: commodity serial hardware often supports only the minimum requirements for the most common uses. I.e., it's often not full RS-232 (or RS-XXX) compliant.