kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* How to make /dev/ttyACM0 (and friends) exclusive?
@ 2019-03-02  4:29 Jeffrey Walton
  2019-03-02  7:50 ` Greg KH
  2019-03-02 18:45 ` valdis.kletnieks
  0 siblings, 2 replies; 13+ messages in thread
From: Jeffrey Walton @ 2019-03-02  4:29 UTC (permalink / raw)
  To: kernelnewbies

Hi Everyone,

I'm trying to trackdown a problem using my dialup modem. I have a
program that opens the modem and watches caller id's. It flashes the
hook when a telemarketer calls. It works well until...

When another program opens the modem then my program starts reading
intermittent responses intended for the other program.

I cannot seem to open the device in exclusive mode. The current open
is (I also tried with O_EXCL):

    int modem = open(device_path, O_RDWR | O_NOCTTY | O_SYNC);

I'm not sure if it because udev configures the device incorrectly or
the kernel driver is configured incorrectly. Or maybe it is impossible
to do.

Does anyone know how I can make the device exclusive?

Thanks in advance.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-10-11 14:54 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-02  4:29 How to make /dev/ttyACM0 (and friends) exclusive? Jeffrey Walton
2019-03-02  7:50 ` Greg KH
2019-03-02 18:45 ` valdis.kletnieks
2019-03-02 19:36   ` Jeffrey Walton
2019-03-03  5:55     ` valdis.kletnieks
2019-03-03  8:55       ` Jeffrey Walton
2019-03-03 11:00         ` Greg KH
2019-03-04 13:04           ` Jeffrey Walton
2019-03-04 13:20             ` Greg KH
2019-03-04 15:38             ` Yann Droneaud
2019-03-04 22:01               ` valdis.kletnieks
2020-10-06 20:41                 ` Daniel Santos
2020-10-11 14:52                   ` linux lover

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).