Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!ukma!uflorida!haven!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.unix.questions Subject: Re: /bin/sh -s flag Message-ID: <13839@mimsy.UUCP> Date: 3 Oct 88 22:04:19 GMT References: <5651@sgistl.SGI.COM> <3741@boulder.Colorado.EDU> <703@necis.UUCP> <8625@smoke.ARPA> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 27 >In article <13820@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes: >>The `-s' option means `reading stdin'; it gets set automatically >>*after* the shell sets up $-. When you `set ', sh updates >>its list of currently set flags, and -s suddenly appears. I regard >>this as a minor bug, which I may fix later. In article <8625@smoke.ARPA>, gwyn@smoke.ARPA (Doug Gwyn ) writes: >Be careful! The c, s, i, and r flags are automatically set by the shell >and should not be alterable by the user. The s flag SHOULD be set for >normal interactive shell use. You misinterpret: I mean that `$-' should expand to s *before* typing `set'. I.e.: % /bin/sh $ echo $- s $ The `r' flag has always been settable with `set -r'; obviously it should not be unsettable with `set +r'. `-s' is in fact never inspected again, and clearing it after startup would have no effect, but I have arranged that both it and -i cannot be unset. The -c flag is parsed specially anyway, so it is no trouble. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris