Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!uunet!infonode!ingr!b8!harbis From: harbis@b8.ingr.com (Randy Harbison) Newsgroups: comp.lang.c Subject: Volatile global variable Message-ID: <1991Mar21.160849.1520@b8.ingr.com> Date: 21 Mar 91 16:08:49 GMT Article-I.D.: b8.1991Mar21.160849.1520 Organization: Intergraph Corporation Huntsville, AL Lines: 19 I have a program that runs interactively with a remote host through a TTY rs-232 device. The program uses getc() to capture information flow. When the remote machine dies or just locks up, so does my program. I would like to know if/how to have a variable that can be altered apart from the normal execution routines of the code. Example: A pointer which is pointing to the address of the system clock. This variable would change in relation to the clock in runtime. (I am specifically interested in the variable incrementing as the seconds increase). Questions: 1. What TYPE would the variable be? 2. How would I find the address of the clock (seconds)? 3. How would I assign the variable to the clock's address? 4. If I'm way out in left field, what would be the reasonable options?