Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!sdd.hp.com!ucsd!ucbvax!bloom-beacon!eru!luth!sunic!isgate!krafla!bergur From: bergur@kerfi.hi.is (Bergur Thorisson) Newsgroups: comp.sys.hp Subject: O_NDELAY doesn't seem to work on sockets in HP-UX 7.0 Keywords: sockets nonblocking 7.0 Message-ID: <2092@krafla.rhi.hi.is> Date: 23 Aug 90 18:22:36 GMT Sender: usenet@rhi.hi.is Distribution: comp Lines: 23 I am using sockets on an HP-9000/360 running hp-ux 7.0 and need reads to be non-blocking which, for the life of me, does not seem to work. After initializing the socket I use: if( (fcntl( s, F_GETFL, flag)) == -1 ) WriteErrLog("SiggiVar uti"); else{ flag |= O_NDELAY; if( (fcntl( s, F_SETFL, flag )) == -1 ) WriteErrLog("SiggiVar uti lengi"); } And then the read call looks like this: len = recv(s, buf, 16, 0); But the read blocks. Is there something I am getting wrong here or is this a bug and if so is there a workaround. HP has said 'gee I dunno know use select' but I don't find that an acceptable answer unless that is the only one. Bergur Thorisson Engineering Research Institute Univerisity of Iceland -- Reykjavik