Using 'exit' in a Bourne shell script

Paul K Heffner heff at flnexus.ATT.COM
Thu Feb 4 00:57:44 AEST 1988


in article <3564 at mtgzz.UUCP>, avr at mtgzz.UUCP (XMRP50000[jcm]-a.v.reed) says:
> 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.
> Any sh script can kill its parent shell (in your case, the login shell)
  with
> kill -1 `ps -f -p $$|grep $$|cut -c16-20`

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.



Paul Heffner
AT&T Orlando



More information about the Comp.sys.att mailing list