[Mono-bugs] [Bug 693370] SerialPort.Open() does not throw an exception if serial port is already open by another application

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu May 19 16:14:55 EDT 2011


https://bugzilla.novell.com/show_bug.cgi?id=693370

https://bugzilla.novell.com/show_bug.cgi?id=693370#c2


Konrad Kruczyński <konrad.kruczynski at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |konrad.kruczynski at gmail.com

--- Comment #2 from Konrad Kruczyński <konrad.kruczynski at gmail.com> 2011-05-19 20:14:54 UTC ---
Hi,
I quickly investigated the bug. It is more complicated than it seems, though.
As you mentioned, gtkterm, minicom and other programs using serial port use
lock files in /var/lock. It is quite standard technique on Linux, however not
for unices in general. For example there is a little difference on BSD and Mac
OS X does not use lockfiles. Current serial port implementation relies mainly
on POSIX, which gives them possibility of operating on many problems out of the
box. Adding locking to it has to be done, however, in a platform specific way.
Naturally, it can be done and should be done. Nevertheless it takes some time
to do it, because of needed research (how to do it on various platforms) and
further testing. If I possess enough time, I will try to implement it. If you
want to cooperate, tell me.

As a workaround I could propose either using /var/lock for your own (if you
want to do it like gtkterm) or obtain a System.Threading.Mutex (this lock will
be respected only by copies of your program).

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list