Using 'exit' in a Bourne shell script

Owl Of Nite jonl at sco.COM
Fri Feb 12 02:29:32 AEST 1988


+-I seem to recall emigh at ncsugn.UUCP (Ted H. Emigh) writing:
|
| In article <144 at flnexus.ATT.COM> heff at flnexus.ATT.COM (Paul K Heffner) writes:
| > In article <169 at mccc.UUCP>, pjh at 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 at TUCC                  @ncsuvx.ncsu.edu:emigh at 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 at sco.com          || ...!{uunet, ihnp4, ucbvax!ucscc}!sco!jonl
Evil:     || niteowl at ssyx.ucsc.edu || ...!{ucbvax}!ucscc!ssyx!niteowl
===============================================================================



More information about the Comp.unix.questions mailing list