libnfc
libnfc copied to clipboard
buses/uart: Use 'lockf()' for serial locking
Using this standard Linux mechanism to lock serial ports has the advantage that if the process is killed the lock is automatically released.
Before a lock was simulated using the custom termios 'c_iflag' value 0x80000000, which has the disadvantage, other than being non-standard, that if the process is killed before closing the serial port, it would appear as locked and require manual cleanup of the flag.
Does it work under Windows?