Xref: utzoo comp.sys.att:2367 comp.unix.questions:5430 Path: utzoo!mnetor!uunet!husc6!rutgers!mtune!codas!flnexus!heff From: heff@flnexus.ATT.COM (Paul K Heffner) Newsgroups: comp.sys.att,comp.unix.questions Subject: Re: Using 'exit' in a Bourne shell script Message-ID: <144@flnexus.ATT.COM> Date: 3 Feb 88 14:57:44 GMT References: <3564@mtgzz.UUCP> Organization: AT&T-IS, Orlando, FL Lines: 21 in article <3564@mtgzz.UUCP>, avr@mtgzz.UUCP (XMRP50000[jcm]-a.v.reed) says: > 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. > 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