Callback responses

Mike Macgirvin mike at relgyro.stanford.edu
Fri Jun 23 07:01:23 AEST 1989


	My thanks to those who responded to my plea for assistance
implementing a callback mechanism. The solution was very simple:
	Instead of fighting init/getty, let them do their work as
normal. This reduced the program to:
	
callback()
{
	
	if(uucp_lock())
		exit();
	create_uucp_lock();
	sleep(AWHILE);
	set_baud_rate();
	dial(phone_number);
	sleep(ASHORTWHILE);
	remove_uucp_lock();
	exit();

}

	After the number is dialed, it just sleeps long enough to
make a connection, then exits, and getty takes over.....

Thanx again....

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+            These views are my own, and may not be correct.                +
+  Mike Macgirvin                                                           +
+  - Systems Administrator  Stanford Relativity Gyroscope Experiment        +
+  - Internet:              mike at relgyro.stanford.edu (36.64.0.50)          +
+  - Bitnet:                mike%relgyro.stanford.edu at stanford              +
+  - Uucp:                  uunet!relgyro.stanford.edu!mike                 +
+  "There must be some kind of way out of here." - Dylan (w/help from Jimi) +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



More information about the Comp.unix.wizards mailing list