open and no carrier

open and no carrier

Post by jvars.. » Thu, 10 Oct 1996 04:00:00



I'm opening a file descriptor (fd) for /dev/modem.  If the modem doesn't
have a carrier on it the open doesn't return until either I get a carrier,
or i get a signal (from alarm).  Currently I'm using system("stty -f modem");
to remidy the program, which make the open return successfully, even if there
is no carrier present.  
   I've heard that specifying O_NDELAY on the device would solve this problem,
but I can't do that in the open() on BSDI.  

   Does anyone either have the code for stty, or know how it riggs the terminal
device to return a success to open even if there is no carrier?

please post, or e-mail me

-jason
____________oOOo__/~~~~\__oOOo_________________________________________

 
 
 

open and no carrier

Post by Roger Espel Lli » Thu, 10 Oct 1996 04:00:00



>I'm opening a file descriptor (fd) for /dev/modem.  If the modem doesn't
>have a carrier on it the open doesn't return until either I get a carrier,
>or i get a signal (from alarm).  Currently I'm using system("stty -f modem");
>to remidy the program, which make the open return successfully, even if there
>is no carrier present.  
>   I've heard that specifying O_NDELAY on the device would solve this problem,
>but I can't do that in the open() on BSDI.  

>   Does anyone either have the code for stty, or know how it riggs the terminal
>device to return a success to open even if there is no carrier?

Try running it under strace to see what system calls it makes;  I'm not
positive about strace supporting BSDI, but BSDI seems to have a reasonable
ptrace() interface so there's no reason it wouldn't.

archie gives:

Host ftp.warwick.ac.uk

    Location: /pub/archive/comp.sources.misc/volume43
          DIRECTORY drwxr-xr-x        512  Jul  9 1994  strace

        -Roger
--

WWW page & PGP key: http://www.eleves.ens.fr:8080/home/espel/index.html

 
 
 

1. DHCP Server open-source carrier grade.

Hi, I'd like to start an open source project for a carrier grade DHCP
Server, which can be used in broadband and NGN Network.

Which are the best baseline project to start from.

Many thanks.

Bye.

2. localhost not found

3. SuSE Unveils Carrier Grade Linux; IBM Opens Linux Center In London

4. yahoo smtp linux example please

5. Matrox Mystique ands X.

6. Print Filters

7. Not Available these Signal nos on Linux

8. Multilink PPP

9. CD-RW: CDFS? Unstable dev nos?

10. NOS shootout

11. Seeds for random nos.

12. faster NOS: NetWare or Linux?