Newsgroups: comp.os.minix Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: System calls: particularly checking if input is available on stdin Message-ID: <1989Sep22.203509.10874@utzoo.uucp> Organization: U of Toronto Zoology References: <1730@draken.nada.kth.se> Date: Fri, 22 Sep 89 20:35:09 GMT In article <1730@draken.nada.kth.se> matsl@nada.kth.se (Mats Luthman) writes: >I know how to do it in both BSD and AT&T UNIX, but I can't find a fcntl >function in libc.a (on MINIX-ST)... This function did not exist in V7, which is what Minix is modelled on. Nor did the ability to determine presence of pending input. >.... doesn't say very much about how to use them, and gtty and stty >aren't even mentioned (in the index). Minix has probably emulated V7 in this regard: gtty and stty were obsolete backwards-compatibility interfaces for ioctl. They can't do anything that ioctl can't. >... Another thing I can't find is macros for the mode parameter to open(). Again, in V7 there weren't any. The mode parameter was specified as integer values (0 readonly, 1 writeonly, 2 readwrite). >Another thing I want to know: if I want a certain function to be called >every time there is input available on a file descriptor, what do I do? >There is no SIGIO signal, so I wonder if it is at all possible. Can't be done in V7. SIGIO is a hideous botch; I'm not surprised that Andy didn't put it into Minix. -- "Where is D.D. Harriman now, | Henry Spencer at U of Toronto Zoology when we really *need* him?" | uunet!attcan!utzoo!henry henry@zoo.toronto.edu