papowell@attila.cs.umn.edu (08/15/88)
I would like a Bombproof Readline function to do the following, under SYSV and/or 4.2/4.3. Conditional compilation is fine, but I would like a version that is portable across both systems. 1. set up a read from a terminal (pipe), that should time out in N seconds (N >= 0). 2. if I get a signal (of various flavours), I would like to either A. continue the read until I get a whole line, that is, the user enters '\n'. B. Discard the entire line that he has typed in. C. Save the line that he has typed in, and then possibly PUSH IT BACK ON THE INPUT. A fair time ago there was a discussion of how to write a bomb-proof version of a read function that would handle the SYSV and 4.2/4.3 signal behaviours. Of course I did not make a copy of this, and now I need it. In addition, I have been trying to figure out if (2) above is possible, especially 2.B under SYSV and 4.2. Can any REAL PROGRAMERS help me out with this? Prof. Patrick Powell, Dept. Computer Science, 136 Lind Hall, 207 Church St. SE, University of Minnesota, Minneapolis, MN 55455 (612)625-3543/625-4002