Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!bionet!agate!shelby!helens!relgyro.stanford.edu!mike From: mike@relgyro.stanford.edu (Mike Macgirvin) Newsgroups: comp.unix.wizards Subject: Callback responses Message-ID: <236@helens.Stanford.EDU> Date: 22 Jun 89 21:01:23 GMT Sender: news@helens.STANFORD.EDU Reply-To: mike@relgyro.stanford.edu (Mike Macgirvin) Distribution: usa Organization: Stanford Relativity Gyro Experiment (GP-B) Lines: 35 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@relgyro.stanford.edu (36.64.0.50) + + - Bitnet: mike%relgyro.stanford.edu@stanford + + - Uucp: uunet!relgyro.stanford.edu!mike + + "There must be some kind of way out of here." - Dylan (w/help from Jimi) + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++