Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!bionet!ames!attctc!digi!kcantrel From: kcantrel@digi.UUCP (Keith Cantrell) Newsgroups: comp.sys.apollo Subject: Re: Async. socket i/o Message-ID: <219@digi.UUCP> Date: 5 Sep 89 23:24:18 GMT References: <1308@syma.sussex.ac.uk> Reply-To: kcantrel@digi.UUCP (Keith Cantrell) Organization: none Lines: 43 In article <1308@syma.sussex.ac.uk> andrewn@syma.UUCP (Andrew D Nimmo) writes: > > Is, as is implied in the 'Programming Enviroment Reference' manual, >the use of asynchronous socket i/o (using fcntl, select and signal) not >possible under SR10.1 (and SR10.0.p)? If this is true when will it be >implemented, or does an update exist to patch this potentially serious ommision? > My problem stems from an fcntl call returning the error 'No such file >or directory' when applied to a known (UNIX) socket - although this is a valid >error, it does not appear to be a valid fcntl error. > I was receiving this error too when I was tring to put a socket into non-blocking mode. The problem turned out to be that I was not doing a fcntl(fd, F_GETFL, 0) before I was doing the fcntl(fd, F_SETFL, FNDELAY). The code segment should be something like: if((a = fcntl(fd, F_GETFL, 0)) == -1) { perror("error"); exit(1); } a |= FNDELAY: if(fcntl(fd, F_SETFL, a) == -1) { perror("error"); exit(1); } This should clear up your 'no such file or directory' error. One thing to note, if you set the environment variable "APOLLO_STATUS" to "TRUE" before you executre a program that makes a calls to "perror", you will get much better error messages. ----------------------------------------------------------------------- Keith Cantrell Phones: hm: 214-492-1088 Apollo Computer wk: 214-519-2399 @ DSC A Subsidiary of Hewlett-Packard USMAIL: EMAIL: 2100 Sonata Ln cantrell@attctc.DALLAS.TX.US Carrollton TX 75007 or ...!attctc!digi!kcantrel My opinion is my own and does not reflect the view of my employer. -----------------------------------------------------------------------