Xref: utzoo comp.unix.wizards:6833 comp.unix.questions:5945 Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!eos!aurora!labrea!decwrl!decvax!elrond!adb From: adb@elrond.CalComp.COM (Alan D. Brunelle) Newsgroups: comp.unix.wizards,comp.unix.questions Subject: "system" call to find out if there is data to be read. Message-ID: <2046@elrond.CalComp.COM> Date: 3 Mar 88 18:33:30 GMT Organization: Calcomp, A Lockheed Company, Hudson, NH, USA Lines: 42 Keywords: ioctl(FIONREAD) nonblocking read I am looking for information regarding simulation of the BSD "select" system call on a Motorola SysV Delta box. The OS has some of the BSD extensions (sans the select, and the ioctl(FIONREAD)). Here is what I would like to do (sort of ...): /* * Cause SIGIO on any input from any of my sockets */ foreach (socket connection) do fcntl(socket, F_SETOWN, pid); /* * Now sit and wait for the Input */ old_mask = sigblock( sigmask(SIGIO) ); sigpause(0); /* * Have signal, now see which socket(s) it applies to */ foreach (socket connection) do if (socket has outstanding data) add socket to set of sockets with input sigsetmask(old_mask); return set of sockets with input outstanding Now what I need to know is how to do if (socket has outstanding data) in a System V box that doesn't have the ioctl(FIONREAD). Any help would be appreciated. Thanks al /-----------------------------------------------------------------------\ | Alan D. Brunelle (adb@elrond.CalComp.COM) (603) 885-8145 | | Calcomp (A Lockheed Company) Display Products Division | | PTP2-2D02 Hudson NH 03051-0908 "We draw on your imagination" (tm) | \-----------------------------------------------------------------------/