* C prg: peeking in stdin before getchar or timeout alarm
@ 1997-03-27 18:36 Bob.Capps
0 siblings, 0 replies; only message in thread
From: Bob.Capps @ 1997-03-27 18:36 UTC (permalink / raw)
To: tru64-unix-managers
We have a process which communicates to dialin terminals which is
expecting things to behave in an orderly fashion: Connect, tell me
what you want to do, are you done, goodbye. The trouble is, things
don't always behave over various local phone lines. We constantly
"hang" our process while it waits for more input from the dialin
terminal. Does anyone have any code fragments to provide either of
the following:
1) a way to "peek" into stdin before we call getchar to see if there
is anything to get and timeout after a certain period of time.
2) a way to set up a timer so that if we don't get out of getchar
before a certain period of time has elapsed, we exit out of the
program.
Thanks!
Bob Capps
bob.capps@ps.net
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1997-03-27 18:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-03-27 18:36 C prg: peeking in stdin before getchar or timeout alarm Bob.Capps
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox