[Mono-dev] [PATCH] Cache errno for serial port

Leszek Ciesielski skolima at gmail.com
Mon Feb 18 08:32:08 EST 2008


2008/2/18 Carlos Alberto Cortez <calberto.cortez at gmail.com>:
> Hey,
>
> The attached patch adds a 'serial_errno' variable in
> mono/support/serial.c, to cache the last error related to serial port
> functions.
>
> At first I tried to just create a function directly retrieving errno,
> but it was getting a different value from the original (probably some
> code modified it after the pinvoke call?).
>
> This is needed to a simple but better error reporting in the
> System.IO.Ports.SerialPort class.

The variable is static. What about cases when multiple serial ports are used?


More information about the Mono-devel-list mailing list