fix: exclusive serial port lock prevents USB port theft

The mux now acquires an flock-based exclusive lock on the serial port
before opening it. This prevents bridges or other processes from directly
opening the same device while the mux owns it. The lock is held for the
duration of the dongle session and auto-released on disconnect or crash.
This commit is contained in:
swaits committed 2026-04-07 18:04:52 -06:00
1 parent 903729ccbe
commit f867383b12
4 files changed
+50 -8

No files matched your search

+10
View File
@@ -1,5 +1,15 @@
# Changelog
## 0.2.1 — 2026-04-07
### Fixed
- **Exclusive serial port lock.** The mux now acquires an `flock`-based
exclusive lock on the serial port before opening it. This prevents other
processes (bridges, other mux instances) from directly opening the same
device while the mux owns it. The lock is held for the duration of the
dongle session and auto-released on disconnect or crash.
## 0.2.0 — 2026-04-07
### Changed