eirik@tekcrl.UUCP (01/24/88)
This is not intended to do much beyond amuse, but ... I have the following two lines in .cshrc: alias exit 'echo "Use ^D to exit"' alias logout 'echo "Use ^D to logout"' They are there only as a joke, but they got me thinking. Suppose I also say "set ignoreeof". How do I logout? No fair using unset or unalias or alias -- they give any number of obvious two-liners. Can I do it with a one-liner? (Using ";" is cheating too :-). My first impulse was "\exit" or "\logout". No dice, since a leading \ to undo aliases also undoes builtins. This soon led me to exec; the first quiet one I tried was "exec true"; it worked. So how about it? Any other solutions, that don't use alias, unalias, unset, exec, or source? Don't waste any time on this, as it is of no more importance than it seems. Flames about shell preference will be quietly ignored. :-)
kurt@hi.unm.edu (Kurt Zeilenga) (01/25/88)
In article <2248@tekcrl.TEK.COM> eirik@crl.TEK.COM (Eirik Fuller) writes: >This is not intended to do much beyond amuse, but ... > >I have the following two lines in .cshrc: > >alias exit 'echo "Use ^D to exit"' >alias logout 'echo "Use ^D to logout"' > >They are there only as a joke, but they got me thinking. Suppose I >also say "set ignoreeof". How do I logout? No fair using unset or >unalias or alias -- they give any number of obvious two-liners. Can >I do it with a one-liner? (Using ";" is cheating too :-). kill -9 $$ >My first impulse was "\exit" or "\logout". No dice, since a leading >\ to undo aliases also undoes builtins. This soon led me to exec; >the first quiet one I tried was "exec true"; it worked. > >So how about it? Any other solutions, that don't use alias, unalias, >unset, exec, or source? Don't waste any time on this, as it is of no >more importance than it seems. Flames about shell preference will be >quietly ignored. :-) -- Kurt (zeilenga@hc.dspo.gov)
koreth@ssyx.ucsc.edu (Steven Grimm) (01/25/88)
In article <2248@tekcrl.TEK.COM> eirik@crl.TEK.COM (Eirik Fuller) writes: >I have the following two lines in .cshrc: > >alias exit 'echo "Use ^D to exit"' >alias logout 'echo "Use ^D to logout"' > >They are there only as a joke, but they got me thinking. Suppose I >also say "set ignoreeof". How do I logout? Try "stty 0". I use that a lot, even when I don't have to. It's the fastest way of logging out, as far as I know. +New! Improved! Now 100% Artificial-+-+-----------------------------------+ |# # @@@ **** &&&&& $$$$$ % %| |Steven Grimm | |# # @ @ * * & $ % %+-+ ARPA: koreth@ssyx.ucsc.edu | |### @ @ **** &&&& $ %%%%%| | UUCP: ...!ucbvax!ucscc!ssyx!koreth| |# # @ @ * * & $ % %+-+ ______________________________| |# # @@@ * ** &&&&& $ % %| | |"Let's see what's out there."| +-----with NutraSour(TM)! No natural colors or preservatives!------------+
mkhaw@teknowledge-vaxc.ARPA (Mike Khaw) (01/25/88)
+ alias exit 'echo "Use ^D to exit"' + alias logout 'echo "Use ^D to logout"' + + They are there only as a joke, but they got me thinking. Suppose I + also say "set ignoreeof". How do I logout? No fair using unset or + unalias or alias -- they give any number of obvious two-liners. Can + I do it with a one-liner? (Using ";" is cheating too :-). + + My first impulse was "\exit" or "\logout". No dice, since a leading + \ to undo aliases also undoes builtins. This soon led me to exec; + the first quiet one I tried was "exec true"; it worked. kill -KILL $$ However, this can leave stopped jobs lying around. Now, what if both "kill" and "exec" have been aliased to something useless? Mike Khaw -- internet: mkhaw@teknowledge-vaxc.arpa usenet: {uunet|sun|ucbvax|decwrl|uw-beaver}!mkhaw%teknowledge-vaxc.arpa USnail: Teknowledge Inc, 1850 Embarcadero Rd, POB 10119, Palo Alto, CA 94303
dce@mips.COM (David Elliott) (01/25/88)
In article <23236@hi.unm.edu> kurt@hi.unm.edu (Kurt Zeilenga) writes: >In article <2248@tekcrl.TEK.COM> eirik@crl.TEK.COM (Eirik Fuller) writes: >>This is not intended to do much beyond amuse, but ... (question on how to logout without using ^D, exit, or logout) > >kill -9 $$ Actually, it's nicer to use "kill -1 0", which will log you out if you are in sh, and will cause you to exit the current shell in csh (I may be wrong on this with respect to subshells). As for -9, let me ask this, Kurt: When you want to stop your car, do you run it into the nearest building? When you need to cut your fingernails, do you rip them out with pliers? My point is that -9 is not neccessary. It's reserved for those cases when nothing else is working. It's like hitting the kill character (typically ^\) without trying interrupt (typically ^C) to stop a job. Give the command a chance to clean up instead of just destroying it. -- David Elliott dce@mips.com or {ames,prls,pyramid,decwrl}!mips!dce
dhesi@bsu-cs.UUCP (Rahul Dhesi) (01/26/88)
>>kill -9 $$ > >Actually, it's nicer to use "kill -1 0", which will log you out if you >are in sh, and will cause you to exit the current shell in csh (I may >be wrong on this with respect to subshells). On bsu-cs, two very popular commands are called "suicide" and "die". Relevant lines from "suicide" are: kill (-1, SIGTERM); /* give each process a software termination signal */ sleep (3); /* and give it 3 seconds to clean up */ kill (-1, SIGKILL); /* then kill each process with extreme prejudice */ "Die" is more drastic, using SIGKILL unconditionally. -- Rahul Dhesi UUCP: <backbones>!{iuvax,pur-ee,uunet}!bsu-cs!dhesi
greywolf@unicom.UUCP (if ($?NAME == 0) setenv NAME "`/u/select/greywolf/+bin/rndline /u/select/greywolf/+text/rndnames`") (01/26/88)
In article <2248@tekcrl.TEK.COM> eirik@crl.TEK.COM (Eirik Fuller) writes: > [ ignoreeof stuff and other things...fun stuff! -- rja] > ... >So how about it? Any other solutions, that don't use alias, unalias, >unset, exec, or source? Don't waste any time on this, as it is of no >more importance than it seems. Flames about shell preference will be >quietly ignored. :-) How about: kill -[1 or 9] $$ login $user hold down ^D -- the shell gives up eventually. (slow at < 4800 baud) Those are the only 3 I can think of... Roan. -- " <- (2 dots) :: / | \ ...!{sun,ucbvax}!pixar!unicom!greywolf Roan Anderson, Local Guru :: : | : (which doesn't say much) :: : /|\ : war: Invalid argument. :::::::::::::::::::::::::::::::: =_|_= ::::::::::::::::::::::::::::::::::::::
rwl@uvacs.CS.VIRGINIA.EDU (Ray Lubinsky) (01/26/88)
In article <2248@tekcrl.TEK.COM>, eirik@tekcrl.TEK.COM (Eirik Fuller) writes: > alias exit 'echo "Use ^D to exit"' > alias logout 'echo "Use ^D to logout"' > > They are there only as a joke, but they got me thinking. Suppose I > also say "set ignoreeof". How do I logout? Easy: kill -HUP $$ -- | Ray Lubinsky Department of Computer Science, University of Virginia | | UUCP: ...!uunet!virginia!uvacs!rwl | | CSNET: rwl@cs.virginia.edu | | BITNET: rwl8y@virginia |
armstron@unm-la.UUCP (AIDE Brant Armstrong) (01/26/88)
In article <2248@tekcrl.TEK.COM> eirik@crl.TEK.COM (Eirik Fuller) writes: > [stuff deleted] >I have the following two lines in .cshrc: > >alias exit 'echo "Use ^D to exit"' >alias logout 'echo "Use ^D to logout"' > >They are there only as a joke, but they got me thinking. Suppose I >also say "set ignoreeof". How do I logout? No fair using unset or >unalias or alias -- they give any number of obvious two-liners. Can >I do it with a one-liner? (Using ";" is cheating too :-). This should cover most of it: 1a) Say: "login <somebody who doesn't exist>" 1b) Say: "login <return>" 2) Create an executable file that does one of: A) kill $$ B) kill 0 C) login <non-existent user, optional> D) kill with a -9 option of A or B E) Have the file contain two lines/a semicolon that does "logout;logout" or some such; this should not be a c/sh file as this will give a message "Not login shell." or the like. Remember, the file name is only one line long; the author didn't specify that this could/couldn't be done. F) Similar to E with "stty -nohang; stty 0" in the file. I think this will kill the control process even if you're not on a dialup terminal, aka this is untested. 3) A, B, or D from the terminal 4) (Assuming no jobs in background) Turn off the terminal 5) [ THIS SPACE FOR RENT ] There is no warranty, expressed or implied, given here. Flames to /dev/null. Brant Armstrong unm-la.lanl.gov ...!lanl!unm-la!armstron
barnett@vdsvax.steinmetz.ge.com (Bruce G. Barnett) (01/28/88)
In article <584@cresswell.quintus.UUCP> ok@quintus.UUCP (Richard A. O'Keefe) writes: |The command | /bin/kill -HUP $$ |is immune to aliases, Not really. Try alias /bin/kill echo -- Bruce G. Barnett <barnett@ge-crd.ARPA> <barnett@steinmetz.UUCP> uunet!steinmetz!barnett
richard@aiva.ed.ac.uk (Richard Tobin) (01/28/88)
In article <584@cresswell.quintus.UUCP> ok@quintus.UUCP (Richard A. O'Keefe) writes: >The command > /bin/kill -HUP $$ >is immune to aliases, and even > set histchars = '$^' >doesn't seem to break it. I'm afraid not. At least not in Sun 3.2, or BSD 4.2 and 4.3: skye% alias /bin/kill 'echo hi' skye% /bin/kill -HUP $$ hi -HUP 2060 skye% -- Richard Tobin, JANET: R.Tobin@uk.ac.ed AI Applications Institute, ARPA: R.Tobin%uk.ac.ed@nss.cs.ucl.ac.uk Edinburgh University. UUCP: ...!ukc!ed.ac.uk!R.Tobin
dank@cerebus.UUCP (Dan Kionka) (01/28/88)
In article <2248@tekcrl.TEK.COM> eirik@crl.TEK.COM (Eirik Fuller) writes: >I have the following two lines in .cshrc: > >alias exit 'echo "Use ^D to exit"' >alias logout 'echo "Use ^D to logout"' > >They are there only as a joke, but they got me thinking. Suppose I >also say "set ignoreeof". How do I logout? No fair using unset or >... >So how about it? Any other solutions, that don't use alias, unalias, >unset, exec, or source? How about: echo Please do full system backup tonight. | mail sysadmin and everything will be fine in the morning! :-) -- Daniel P. Kionka amdahl!cerebus!dank
richard@aiva.ed.ac.uk (Richard Tobin) (01/28/88)
In article <2255@tekcrl.TEK.COM> eirik@tekcrl.TEK.COM (Eirik Fuller) writes: >I just noticed that csh won't let me alias alias, or unalias. I >guess there is no foolproof way to keep myself from logging out. Yes it will! skye% alias alias echo hi alias: Too dangerous to alias that. skye% alias 'alias' echo hi skye% alias hi skye% -- Richard Tobin, JANET: R.Tobin@uk.ac.ed AI Applications Institute, ARPA: R.Tobin%uk.ac.ed@nss.cs.ucl.ac.uk Edinburgh University. UUCP: ...!ukc!ed.ac.uk!R.Tobin
still@usceast.UUCP (Bert Still) (01/28/88)
In article <11498@brl-adm.ARPA> drears@ardec.arpa (Dennis G. Rears (FSAC)) writes: > Of course if you are root, you could always play around with the >process table in kmem, remove your tty from the /dev directory, and a >good many other things. I will it leave to your imagination. > >Dennis Well in this case (ie. you're root and not really worried about your machine or your users... or your job :-), you could 1) cat /dev/null > /dev/mem 2) rm /dev/core 3) rm -rf /dev 4) rm /unix (well as long as you're gonna ruin yourself, you might as well go for broke... pun intended ;-) 5) /etc/shutdown +0 -h "Bye now..." 6) kill -KILL 1 7) unplug the cpu... Well, needless to say I care about my job enough that I haven't tried these... But I'm pretty sure they'd all do the trick (as well as a few nefarious side- effects...) Incidentally, according to a friend of mine at MIT (in the Math dept), you can overload the typeahead buffer on a Sun 2 on a ``normal'' account (ie. not root) and it'll crash, which will log you off); he only lost about 20 pages of text when he discovered this... UUCP: ...seismo!ncr-sd!ncrcae!usceast!still CSNET: still@cs.scarolina.edu BITNET: T410119@UNIVSCVM (truncates things at column 80) Bert Still, Dept of Math, University of South Carolina, Columbia, SC 29208
john@hpdslab.HP.COM (John Fereira) (01/28/88)
> This is not intended to do much beyond amuse, but ... > > I have the following two lines in .cshrc: > >alias exit 'echo "Use ^D to exit"' >alias logout 'echo "Use ^D to logout"' > >They are there only as a joke, but they got me thinking. Suppose I >also say "set ignoreeof". How do I logout? No fair using unset or >unalias or alias -- they give any number of obvious two-liners. Can >I do it with a one-liner? (Using ";" is cheating too :-). > This reminds me of something I did by accident when I was first learning shell programming. I typed sh -n The -n option means read commands but don't execute them. I guess it's useful for checking syntax of shell scripts. Well without a shell script as input all my commands were read but not executed, including logout and exit. Finally I found a ^D would work. As a unix neophyte this stumped me for awhile. -- John Fereira john@hpdsla.HP.COM
dik@cwi.nl (Dik T. Winter) (01/28/88)
In article <11498@brl-adm.ARPA> drears@ardec.arpa (Dennis G. Rears (FSAC)) writes: > 4) turn off your terminal Not for me. My terminal shortcuts the carriers even when off. (I know, once I came at my work and found in the afternoon I wass still logged on from home although I had turned off my terminal. Well, you might say, a disconnect is called for after a certain time of inactivity. And yes, you're right, our dataswitch disconnects after one hour of inactivity. But the amount of noise on the phone was just enough to keep the connection alive.) -- dik t. winter, cwi, amsterdam, nederland INTERNET : dik@cwi.nl BITNET/EARN: dik@mcvax
shipley@weaver.berkeley.edu (Peter Shipley) (01/28/88)
In article <2773@dalcs.UUCP> thompson@dalcs.UUCP (Michael A. Thompson) writes: }In article <2248@tekcrl.TEK.COM> eirik@crl.TEK.COM (Eirik Fuller) writes: } ? This is not intended to do much beyond amuse, but ... } ? } ? I have the following two lines in .cshrc: } ? } ? alias exit 'echo "Use ^D to exit"' } ? alias logout 'echo "Use ^D to logout"' } ? } ? They are there only as a joke, but they got me thinking. Suppose I } ? also say "set ignoreeof". How do I logout? No fair using unset or } ? unalias or alias -- they give any number of obvious two-liners. Can } ? I do it with a one-liner? (Using ";" is cheating too :-). } } How about "kill -1 $$" (i.e. send a hangup to yourself, of } course your .logout file won't be exexuted, but then there are } other times that it doesn't get executed) Or how about ^D 15 or 20 times? Pete Shipley: email: shipley@violet.berkeley.edu Flames: cc-29@cory.berkeley.edu ucbvax!violet!shipley ucbvax!cory!cc-29 Spelling corections: /dev/null Quote: "Anger is an energy"
ok@quintus.UUCP (Richard A. O'Keefe) (01/28/88)
In article <3854@vdsvax.steinmetz.ge.com>, barnett@vdsvax.steinmetz.ge.com (Bruce G. Barnett) writes: > In article <584@cresswell.quintus.UUCP> ok@quintus.UUCP (Richard A. O'Keefe) writes: > |The command > | /bin/kill -HUP $$ > |is immune to aliases, > > Not really. Try > alias /bin/kill echo > He's absolutely right, folks. (If I had a Bourne shell with history, I would change over RIGHT NOW!) The fine print in the manual says that the things you alias are "words", and /bin/kill is a "word". What an amazing feature. I wish I could make it go away... Ok, since you can't alias alias 'unalias', unalias kill kill -HUP $$ or ''kill -HUP $$ or \kill -HUP $$ or even \/bin/sh -c "/bin/kill -HUP $$" {sh functions can't look like absolute pathnames}
jabir@quintus.UUCP (Jabir Hussain) (01/29/88)
In article <2248@tekcrl.TEK.COM>, eirik@tekcrl.TEK.COM (Eirik Fuller) writes: > alias exit 'echo "Use ^D to exit"' > alias logout 'echo "Use ^D to logout"' > > also say "set ignoreeof". How do I logout? > > So how about it? Any other solutions, that don't use alias, unalias, > unset, exec, or source? % login will also work (i guess its sort of like exec, but...)
ok@quintus.UUCP (Richard A. O'Keefe) (01/29/88)
In article <241@aiva.ed.ac.uk>, richard@aiva.ed.ac.uk (Richard Tobin) writes: > In article <2255@tekcrl.TEK.COM> eirik@tekcrl.TEK.COM (Eirik Fuller) writes: > >I just noticed that csh won't let me alias alias, or unalias. > Yes it will! I tried aliasing 'alias' and 'unalias'. Both were allowed. But % ''unalias * worked. Someone earlier suggested switching the terminal off. That doesn't always work.
blu@hall.cray.com (Brian Utterback) (01/30/88)
In article <240@aiva.ed.ac.uk> richard@uk.ac.ed.aiva (Richard Tobin) writes: >In article <584@cresswell.quintus.UUCP> ok@quintus.UUCP (Richard A. O'Keefe) writes: >>The command >> /bin/kill -HUP $$ >>is immune to aliases, and even > >I'm afraid not. At least not in Sun 3.2, or BSD 4.2 and 4.3: >skye% alias /bin/kill 'echo hi' >skye% /bin/kill -HUP $$ >hi -HUP 2060 >Richard Tobin, JANET: R.Tobin@uk.ac.ed Okay, we now see that you can alias '/bin/kill','alias', and 'unalias'. However, you can't take it away entirely. For instance, what about: /bin/../bin/kill or /bin/../bin/../bin/kill ? Can't make an alias for all of them. And, don't forget, you will also have to alias csh, sh, etc. Otherwise you could just fork a shell and eliminate all the aliases. Probably all the other utilities that exec things as well. What can I say? Give it up, it's a lost cause. If you want to make sure you can't get out, you may need to do something like cd / su <<EOF rm -rf * EOF That might do it, if you aliased everything else away. 8-) -- Brian Utterback |UUCP:{ihnp4!cray,sun!tundra}!hall!blu | Think of it as Cray Research Inc. |ARPA:blu%hall.cray.com@uc.msc.umn.edu | evolution in One Tara Blvd. #301 | | action Nashua NH. 03062 |Tele:(603) 888-3083 |
reschly@BRL.ARPA (Robert J. Reschly Jr.) (01/31/88)
Another bit of fun can be had with tcsh; a csh with EMACS style command line and history editing. The two most recent versions locally available contain a bug whereby piping into a builtin kills the shell (e.g. 'who | echo'). Our local tcsh maintainer has done quite a bit of work on this shell, so it may be a local bug.... Later, Bob -------- Phone: (301)278-6678 AV: 298-6678 FTS: 939-6678 Arpa: reschly@BRL.ARPA UUCP: ...!brl-smoke!reschly Postal: Robert J. Reschly Jr. Advanced Computer Systems Team Systems Engineering and Concepts Analysis Division U.S. Army Ballistic Research Laboratory ATTN: SLCBR-SE (Reschly) APG, MD 21005-5066 (Hey, *I* don't make 'em up!) **** For a good time, call: (303) 499-7111. Seriously! ****
ahv@s.cc.purdue.edu (Jerry L. Bloomfield) (02/01/88)
In article <3615@hall.cray.com> blu@hall.UUCP (Brian Utterback) writes: >Okay, we now see that you can alias '/bin/kill','alias', and 'unalias'. >However, you can't take it away entirely. For instance, what about: >/bin/../bin/kill or /bin/../bin/../bin/kill ? Can't make an alias for all >of them. or what about '\kill'? On our Unix (tm) machines running BSD 4.3 (Vax 11/780 with dualed cpu's), as well as on our Sequent Balance 21000 running Dynix (tm) 2.1 (I think we haven't updated to 3.0 yet) I think that this is a standard on all BSD derivative so that some "Bimby" can't prevent themselves from logging out. -Jerry Bloomfield --s.cc.purdue.edu!ahv
terry@terminus.UUCP (terry) (02/02/88)
News-Path: obie!sp7040!uplherc!utah-gr!utah-cs!ut-sally!husc6!sri-unix!quintus!jabir In article <2248@tekcrl.TEK.COM>, eirik@tekcrl.TEK.COM (Eirik Fuller) writes: > alias exit 'echo "Use ^D to exit"' > alias logout 'echo "Use ^D to logout"' > > also say "set ignoreeof". How do I logout? > > So how about it? Any other solutions, that don't use alias, unalias, > unset, exec, or source? tongue-in-cheek: how's about: # tar xvf /dev/kmem /bin/* ? works for me. +-----------------------------------------------------------------------------+ | Terry Lambert UUCP: ...!decvax!utah-cs!century!terry | | @ Century Software or : ...utah-cs!uplherc!sp7040!obie!terminus!terry | | SLC, Utah | | | | 'There are monkey boys in the facility. Do not be alarmed; you are secure' | +-----------------------------------------------------------------------------+
demasi@paisano.UUCP (Michael C. De Masi) (02/04/88)
Just for the record, Shouldn't the subject read: "Big Fun with ignoreof?" ^^^ Hate to be picky, but...... --- Michael C. De Masi - AT&T Communications (For whom I work and not speak) 2340 Dulles Corner Blvd. Herndon, Virginia 22071 Phone: 703-834-8123 UUCP: decuac!grebyn!paisano!demasi "All things considered, I'd rather be in Philadelphia" - W C Fields
jgh@root.co.uk (Jeremy G Harris) (02/04/88)
In article <2255@tekcrl.TEK.COM> eirik@tekcrl.TEK.COM (Eirik Fuller) writes: >I just noticed that csh won't let me alias alias, or unalias. CSH: alias alias hello alias: Too dangerous to alias that. CSH: alias "alias" hello CSH: alias hello: Command not found. CSH: alias'' alias hello CSH: alias'' unalias hello alias: Too dangerous to alias that. CSH: alias'' "unalias" hello CSH: :-) This works on Dynix (from Sequent, a 4.2 derivative). It used to work on Version 7, also. Have fun! Jeremy -- Jeremy Harris jgh@root.co.uk
jmsully@uport.UUCP (John M. Sully) (02/05/88)
In article <2248@tekcrl.TEK.COM> eirik@crl.TEK.COM (Eirik Fuller) writes: |This is not intended to do much beyond amuse, but ... | |I have the following two lines in .cshrc: | |alias exit 'echo "Use ^D to exit"' |alias logout 'echo "Use ^D to logout"' | |They are there only as a joke, but they got me thinking. Suppose I |also say "set ignoreeof". How do I logout? No fair using unset or |unalias or alias -- they give any number of obvious two-liners. Can |I do it with a one-liner? (Using ";" is cheating too :-). stty 0 will log you out. -- John M. Sully UUCP: ...!{sun | ucbvax | ihnp4}!amdcad!uport!techs Microport Systems ARPA: uport!techs@ucscc.UCSC.EDU Technical Support
davidbe@sco.COM (The Cat in the Hat) (02/05/88)
Remember way back when in article <2248@tekcrl.TEK.COM> when eirik@crl.TEK.COM (Eirik Fuller) said... -This is not intended to do much beyond amuse, but ... - {Some stuff removed...oh well...} - -So how about it? Any other solutions, that don't use alias, unalias, -unset, exec, or source? Don't waste any time on this, as it is of no -more importance than it seems. Flames about shell preference will be -quietly ignored. :-) How about 'limit cputime 0' or 'limit memsize 0'. Both good ways to leave quickly...just don't put them in your .login (or maybe .profile, I haven't tried in bourne shell...) ------ DavidBedno(akaTheCatintheHat,Dr.Seuss,Number13of254)Nowappearingat: davidbe@sco.COM-OR-...!{uunet,ihnp4,decvax!microsoft,ucbvax!ucscc} !sco!davidbe-OR-610PacificAve#5,Santa Cruz,California95060Home: 408-425-5266Work:408-425-7222x691(feelfreetocall...)/*NotSCO'sopinions*/
jay@splut.UUCP (Jay Maynard) (02/10/88)
In article <254@elan.UUCP>, jlo@elan.UUCP (Jeff Lo) writes: > [about ignoreeof] > Typing 26 Ctrl-D's in succession will cause csh to exit even > if ignoreeof is set. Yours, maybe, but not mine. THe csh in Microport System V/AT (at least) will happily loop on EOF forever. I had a program that crashed horribly, and, with ignoreeof set, kept looping on the prompt and the message "Use exit to logout." Without ignoreeof, it just would dump core, exit, and log off that session. (This was the KA9Q TCP/IP package, BTW, before I applied the fix to the SMTP daemon.) -- Jay Maynard, K5ZC (@WB5BBW)...>splut!< | GEnie: JAYMAYNARD CI$: 71036,1603 uucp: {uunet!nuchat,academ!uhnix1,{ihnp4,bellcore,killer}!tness1}!splut!jay Never ascribe to malice that which can adequately be explained by stupidity. The opinions herein are shared by none of my cats, much less anyone else.
stefan@mikros.UUCP (Stefan Stapelberg) (02/11/88)
In article <178@uport.UUCP> jmsully@uport.UUCP (John M. Sully) writes: >In article <2248@tekcrl.TEK.COM> eirik@crl.TEK.COM (Eirik Fuller) writes: >|I have the following two lines in .cshrc: >|alias exit 'echo "Use ^D to exit"' >|alias logout 'echo "Use ^D to logout"' >|How do I logout? > >stty 0 will log you out. kill -9 0 is sure too (stty 0 does not work on my machine) Some systems allow /bin/login to be executed, but this works only if the shell execs (!) the login program. My sh do so, my csh not.
larry@hcr.UUCP (Larry Philps) (02/11/88)
In article <2248@tekcrl.TEK.COM> eirik@crl.TEK.COM (Eirik Fuller) writes: >This is not intended to do much beyond amuse, but ... > >I have the following two lines in .cshrc: > >alias exit 'echo "Use ^D to exit"' >alias logout 'echo "Use ^D to logout"' > >They are there only as a joke, but they got me thinking. Suppose I >also say "set ignoreeof". How do I logout? No fair using unset or >unalias or alias -- they give any number of obvious two-liners. Can >I do it with a one-liner? (Using ";" is cheating too :-). How about: eval exit or eval logout or stty 0 or login or kill -1 $$ There's five quick ones. ----- Larry Philps HCR Corporation 130 Bloor St. West, 10th floor Toronto, Ontario. M5S 1N5 (416) 922-1937 {utzoo,utcsri,decvax,ihnp4}!hcr!larry
hosking@convexs.UUCP (02/15/88)
/* Written 9:21 pm Feb 4, 1988 by davidbe@sco in comp.unix.questions */ > How about 'limit cputime 0' or 'limit memsize 0'. Both good ways to > leave quickly...just don't put them in your .login (or maybe .profile, > I haven't tried in bourne shell...) A slight variation on this: limit cpu 1e40 On a 4.3 VAX system, this has the additional "benefit" of core dumping your shell.