From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,b5ab57bd3f06ab88,start X-Google-Attributes: gidfee84,public From: entrican@ix.netcom.com (Robert Entrican ) Subject: ioctl and device streams on OSF/1 3.0 rev 347 Date: 1995/06/14 Message-ID: <3rlq0v$gli@ixnews3.ix.netcom.com>#1/1 X-Deja-AN: 104317402 distribution: world organization: Netcom newsgroups: comp.unix.osf.osf1 Help! I can't believe I am having such a hard time try to get a very simple program to perform basic dialer functions. I have tried just about every combination of c_cflag modes, and I am fresh out of ideas. Am I just stupid or has anybody else out there had difficulties getting OSF/1 tty's to responds to read()'s and write()'s properly. The program I am attempting to run is so short and simple it's sickening. All I am doing is opening the tty with O_RDWR|O_NDELAY and then dropping into a tight loop. The loop is basically to prompt me for modem commands and I am then writting them to the descriptor returned to me by the open ( tty , mode ) call. Once I write the data, I am calling ioctl ( fd , FIONREAD , &rawTag ) and it is supposed to return to me the number of bytes at the stream head. No matter what I do, this function call returns me 0. I then proceded to attempt to get rid of the FIONREAD, and simply attempt to do the read ( fd , str, 256 ) and this always returns me -1. I am completely confused.... No matter what flags I logically OR together in the c_cflags, c_iflags, and c_oflags elements of termio, I never get the desired result... PLease help, I am about to throw this AXP out the window.... Thank you. Robert Entrican (entrican@ix.netcom.com) AppWorks Incorporated