How to make /dev/ttyACM0 (and friends) exclusive?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux