Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B UNSW 1.1 19 Sep 1984; site csadfa.oz Path: utzoo!linus!philabs!cmcl2!seismo!munnari!natmlab!dmscanb!csadfa!cwj From: cwj@csadfa.oz Newsgroups: net.sources Subject: Lock your terminal for lunch Message-ID: <39@csadfa.oz> Date: Mon, 23-Sep-85 16:26:50 EDT Article-I.D.: csadfa.39 Posted: Mon Sep 23 16:26:50 1985 Date-Received: Wed, 25-Sep-85 10:37:15 EDT Organization: CS, Faculty of Military Studies, Uni of NSW, Duntroon, Aust Lines: 23 Here is a reasonably safe way to lock your terminal for lunch, for `csh' users. It is immune to holding down the interrupt key, and immune to attempts to suspend the program (^z), because it grabs and ignores the former and has nullified the latter. BUT it is still vulnerable to QUIT (^\) - and I don't know why! ("onintr -" is supposed to ignore all interrupts) ---------------------------------------------------------- #!/bin/csh # lock terminal until password received echo "TERMINAL LOCKED" stty -echo susp '' dsusp '' onintr - while ("$< x" != 'YOUR_PASSWORD x') echo 'Please ---- ---, Chris is at lunch' echo -n '% ' end # restore the terminal to a normal state stty echo susp '^z' dsusp '^y' ---------------------------------------------------------- Brought to you by Super Global Mega Corp .com