Path: utzoo!utgpu!water!watmath!clyde!rutgers!cmcl2!beta!unm-la!armstron From: armstron@unm-la.UUCP (AIDE Brant Armstrong) Newsgroups: comp.unix.questions Subject: Re: Fun with ignoreeof Summary: Did I leave out a method? Message-ID: <687@unm-la.UUCP> Date: 26 Jan 88 03:11:54 GMT References: <2248@tekcrl.TEK.COM> Reply-To: armstron@unm-la.UUCP (AIDE Brant Armstrong) Organization: Univ. of New Mexico at Los Alamos Lines: 40 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 " 1b) Say: "login " 2) Create an executable file that does one of: A) kill $$ B) kill 0 C) login 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