EXIT_FAILURE vs EXIT_SUCCESS and its effect on devc-ser8250


I have written a process that is using a serial device that is controlled by
devc-ser8250 and I came across something that seems quite odd. If the
program exits due to a kill signal or an exit(EXIT_SUCCESS) and starts up
again everything will be fine. However, if it exits with an
exit(EXIT_FAILURE), the next time my program is run it will not write
correctly to the serial port until devc-ser8250 is slayed and restarted. For
example, when it starts it will want to write a 14 character string (that
starts with 0x01) to the serial port. If my program starts after an
exit_failure it will only write one byte (0x11) to the serial port.

Brent Tweddle

Discussion continues here: