From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc89c,5f7a1be019fe622f X-Google-Attributes: gidfc89c,public X-Google-Thread: fee84,5f7a1be019fe622f X-Google-Attributes: gidfee84,public From: Tom Leitner Subject: Re: Blocking open problem on Digital Unix Date: 1999/03/08 Message-ID: <7c0fcq$nht@fstgal00.tu-graz.ac.at>#1/1 X-Deja-AN: 452542443 Sender: Thomas Leitner References: <7bmga9$ncr$1@nnrp1.dejanews.com> Organization: Graz University of Technology, Austria User-Agent: tin/pre-1.4-981225 ("Volcane") (UNIX) (OSF1/V4.0 (alpha)) Newsgroups: comp.unix.osf.osf1,comp.unix.programmer In comp.unix.osf.osf1 dshifflett@gwdi.com wrote: > I am having trouble when opening a device with the > O_NONBLOCK option. > I am using Digital Unix 4.0d, > my device is mapped, using LAT, > to a terminal server port, a DEC 90TL terminal server. > The terminal server port is configured to not allow > the connection until the modem signals are active. > My problem is that the open call is hanging, > (because I disconnected the modem, to test this case) > and I expected it to return with some error > indicating the blocked state of the device. > If anyone has any experience in this, > or ideas on what to try I would appreciate > hearing them. Use this for opening the port: chan = open (device, O_RDONLY | O_NDELAY); { int i; i = fcntl(chan, F_GETFL); i &= ~O_NDELAY; fcntl(chan, F_SETFL, i); } Tom -- Tom Leitner Dept. of Communications, Graz Univ. of Technology, tom@radar.tu-graz.ac.at Inffeldgasse 12, A-8010 Graz / Austria / Europe PGP public key @ http://wiis.tu-graz.ac.at/people/tom.html