Sharing a modem from two programs

Sharing a modem from two programs

Post by Richie Biela » Mon, 10 Mar 1997 04:00:00



I want to write a program that displays the status of the
modem signals while pppd is running. I have a program that
shows the modem signals, but I cannot run it if pppd is active,
because the call to open the modem device fails.

The status program will only do ioctl calls. I'm using RH 4.1
(Linux 2.0.27). Is there some obvious call I'm missing
that will allow me to run two programs that can both
open the modem device?

Thanks for any suggestions.

...richie

--


*         Home page:   http://www.netlabs.net/hp/richieb        *
*         Fight software piracy, use free software! (me)        *

 
 
 

Sharing a modem from two programs

Post by Ian T Zimmerm » Tue, 11 Mar 1997 04:00:00




>  I want to write a program that displays the status of the modem
> signals while pppd is running. I have a program that shows the modem
> signals, but I cannot run it if pppd is active, because the call to
> open the modem device fails.
>  The status program will only do ioctl calls. I'm using RH 4.1
> (Linux 2.0.27). Is there some obvious call I'm missing that will
> allow me to run two programs that can both open the modem device?

You are most likely using the cua* device with the lockout option on.
Configure the programs to use the corresponding ttyS* device (your
status program has to use O_NONBLOCK in the open call) and all should
be fine.

Alternatively, execute "setserial" to turn off the lockout. man
setserial for details.

--

I fully support the President's proposal to test driver's license
applicants for *.  Any plan to reduce driving is worth a try.