Xref: utzoo comp.sys.att:2526 comp.unix.questions:5644 Path: utzoo!mnetor!uunet!sco!jonl From: jonl@sco.COM (Owl Of Nite) Newsgroups: comp.sys.att,comp.unix.questions Subject: Re: Using 'exit' in a Bourne shell script Message-ID: <194@scovert> Date: 11 Feb 88 16:29:32 GMT References: <3564@mtgzz.UUCP> <144@flnexus.ATT.COM> <2871@ncsugn.ncsu.edu> Reply-To: jonl@sco.COM (Owl Of Nite) Organization: The Santa Cruz Operation, Inc. Lines: 36 +-I seem to recall emigh@ncsugn.UUCP (Ted H. Emigh) writing: | | In article <144@flnexus.ATT.COM> heff@flnexus.ATT.COM (Paul K Heffner) writes: | > In article <169@mccc.UUCP>, pjh@mccc.UUCP (Peter J. Holsberg) writes: | >> I would like to have my users logout via a shell script "off" rather | >> than with ^d. | | >The command: | | >stty 0 | | >sets your baud rate to zero, forces a hangup which causes SIGHUP to | >be sent to all correspondent processes thereby 86'ing them. This | >has been used with nominal success in some of the 'bye' routines | >on our systems here. | | Of course, this will only work if you want them to be disconnected, rather | than merely logout. In particular, if you have people using su, they may | not want to be disconnected. | | | | -- | Ted H. Emigh, Dept. Genetics and Statistics, NCSU, Raleigh, NC | uucp: mcnc!ncsuvx!ncsugn!emigh internet: emigh%ncsugn.ncsu.edu | BITNET: NEMIGH@TUCC @ncsuvx.ncsu.edu:emigh@ncsugn.ncsu.edu Also, something to be noted is that when using rlogin (at least on 4.2 and 4.3 BSD machines) and stty 0 will be completely ignored by the pseudo tty. if the world was beige, id paint it a different color =============================================================================== jon luini || WORK: 408-425-7222 || HOME: 408-423-2917 Work: || jonl@sco.com || ...!{uunet, ihnp4, ucbvax!ucscc}!sco!jonl Evil: || niteowl@ssyx.ucsc.edu || ...!{ucbvax}!ucscc!ssyx!niteowl ===============================================================================