Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!munnari!mimir!wacsvax!effigy!acp!julian From: julian@acp.OZ (Julian Elischer) Newsgroups: comp.unix.wizards Subject: TERMIO wait /no wait operation Message-ID: <403@acp.OZ> Date: Fri, 2-Oct-87 00:44:02 EDT Article-I.D.: acp.403 Posted: Fri Oct 2 00:44:02 1987 Date-Received: Fri, 9-Oct-87 04:40:38 EDT Organization: Australian Computer Products, Perth, Australia Lines: 45 Keywords: TERMIO ICANON TIMEOUT Reading the unix system V.2 and V.3 manuals, I see that if ICANON is not set then a read will return an TIME 10ths of a second or when MIN characters are available. I cannot however see how to get it to sit indefinitly and wait for a character. Is this feature (timeouts) only available if the O_NDELAY flag is set in the file or is it always operational. Is this feature used widely? Does anybody know of documentation that is clear on this point? It is quite possible that the information I seek is actually somewhere in the 3b2 sysV manuals I have, but you have to know what's in them already if you want to find anything which is a bit of a pain. (for instance to find out how to stop fork/exit from creating zombies, you have to look under SIGNAL of all places!)(flame off) Several items I would like to find out are: 1/ what is the exact configuration of termio needed give the standard RAW mode under sysV. 2/ is there a similar timeout facility available for pipes or do i HAVE to use ALARM/SIGNAL etc? 3/ is there any clearer description of SYSV.3 shared memory/ massages/semaphore operations than the hopeless ATT "Documentation".. something that describes the whole thing in a useable way instead of drowning you in details. 4/ does a value of 255 or something disable the TIMEOUT in the affore mentioned TERMIO ~ICANON mode ? or does it have to be enabled by some hidden switch?? do I have to loop every 25.5 seconds? When I run programs trying this, they seem to just wait. (c_cc[5] = 0) how do I then get it to come back straight away? This is how I see it at the moment.. could someone give me some idea what REALLY HAPPENS? if you want immediate return, use the O_NDELAY flag with fcntl() if you want to wait indefinitly, use c_cc[5] = 0 in ioclt with O_NDELAY not active. if you want n 10ths timeout, use c_cc[5] = n in ioctl() with O_DELAY inactive. is this right? thanks for any replies from those ahead of myself. replies from thos not ahead will be laughed at according to merrit 8-). replies by mail please: julian elischer uucp: {lots of places }!munnari!acp.oz!julian ACSnet (that's within australia to those out there in usa land ): julian@acp.oz