Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!husc6!bloom-beacon!oberon!sdcrdcf!trwrb!felix!ccicpg!turnkey!conexch!sandy From: sandy@conexch.UUCP Newsgroups: comp.unix.xenix Subject: How to use SCO's ungetty Message-ID: <144@conexch.UUCP> Date: Tue, 27-Oct-87 15:24:47 EST Article-I.D.: conexch.144 Posted: Tue Oct 27 15:24:47 1987 Date-Received: Tue, 17-Nov-87 07:18:03 EST Organization: The Consultants' Exchange, Orange County, CA. (714) 842-6348 Public Access Lines: 22 Keywords: ungetty getty If you are writting your own getty program and wish to be able to use SCO's ungetty, all you need to do is the following: Trap SIGUSR1 - This is the way that ungetty tells getty to "go to sleep". When you receive this signal, you must do the following: a) fclose(stdin) b) fclose(stdout) c) fclose(stderr) d) close(0) e) close(1) f) close(2) g) re-write utmp so that LOGIN is nolonger there but is now DIALOUT h) (void) pause() i) exit(0) Note: since you are using a "pause", any signal that is redirected back to your getty will terminate the process. Note again: Since getty, as far as init is concerned, has not died, a new getty will not be spawned until ungetty is finished! Sanford ( Sandy ) Zelkovitz XBBS 714-828-0288