Re: ModemManager serial port lock-files
- From: Dan Williams <dcbw redhat com>
- To: Dmitry Ivanyushin <defance gmail com>
- Cc: networkmanager-list gnome org
- Subject: Re: ModemManager serial port lock-files
- Date: Fri, 07 Jun 2013 16:31:20 -0500
On Fri, 2013-06-07 at 17:43 +0400, Dmitry Ivanyushin wrote:
I am working with git version of MM and Ubuntu 12.04.
I have three different physical serial (RS232) ports and they are not
USB-to-serial. Now MM probes all of them. I want MM to automatically detect
the port the modem is connected to but there're another devices controlled
by another daemon.
If there were lock files, my daemon wouldn't probe the ports which are
locked by MM and vice-versa.
ModemManager does not use lockfiles as there are various well-understood
problems with them. It does, however use TIOCEXCL which any other
program using doing serial stuff should probably be doing too. Doing it
through the ioctl means there are no stale lock files left if something
crashes and no need to write stuff out to random places.
Dan
2013/6/7 Aleksander Morgado <aleksander lanedo com>
I have several serial ports in my system but also I have a daemon that
is responsible for communication with several devices connected to those
serial ports. This daemon runs as root. However when MM starts it tries
to find modem via writing to all serial ports registered in the system.
That operation break protocols of these devices.
I am thinking of adding support of lock-files to MM. Is it good to add
such support in mm-manager.c to test locks, in mm-serial-port to acquire
and release those locks?
What MM version is this? MM shouldn't be probing platform serial (RS232)
ports by default, unless they are explicitly white-listed. For USB
devices exposing ttys which aren't modems, we can blacklist them in our
udev rules. Would that help?
--
Aleksander
_______________________________________________
networkmanager-list mailing list
networkmanager-list gnome org
https://mail.gnome.org/mailman/listinfo/networkmanager-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]