libnfc icon indicating copy to clipboard operation
libnfc copied to clipboard

buses/uart: Use 'lockf()' for serial locking

Open thg2k opened this issue 4 years ago • 1 comments

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.

thg2k avatar Apr 13 '21 12:04 thg2k

Does it work under Windows?

neomilium avatar Oct 21 '23 15:10 neomilium