Volatile global variable

Randy Harbison harbis at b8.ingr.com
Fri Mar 22 02:08:49 AEST 1991


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?



More information about the Comp.lang.c mailing list