Bug 56990 - System.IO.Ports SerialPort doesn't lock serial port using flock
Summary: System.IO.Ports SerialPort doesn't lock serial port using flock
Alias: None
Product: Class Libraries
Classification: Mono
Component: System (show other bugs)
Version: 4.6.0 (C8)
Hardware: Other Linux
: --- enhancement
Target Milestone: Community
Assignee: Bugzilla
Depends on:
Reported: 2017-05-31 04:17 UTC by Craig McQueen
Modified: 2017-09-13 13:42 UTC (History)
2 users (show)

See Also:
Is this bug a regression?: ---
Last known good build:


Description Craig McQueen 2017-05-31 04:17:00 UTC
On Linux, it seems to be a convention that programs using a serial port should lock the port for exclusive access using flock(fd, LOCK_EX | LOCK_NB), or else fail with an error to indicate the serial port is already in-use.

It would be good if System.IO.Ports SerialPort would implement this locking on Linux.

https://stackoverflow.com/q/29482327/60075 "Locking a Linux serial port or other device in Mono"
https://stackoverflow.com/q/30316722/60075 "What is the best practice for locking serial ports and other devices in Linux?"

Note You need to log in before you can comment on or make changes to this bug.