From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22824 invoked by alias); 12 May 2015 08:42:35 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 35088 Received: (qmail 2706 invoked from network); 12 May 2015 08:42:32 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 X-AuditID: cbfec7f4-f79c56d0000012ee-d3-5551bcf3d289 To: undisclosed-recipients: ; Date: Tue, 12 May 2015 09:42:25 +0100 From: Peter Stephenson Cc: zsh-workers@zsh.org Subject: Re: Failure of "typeset" and exit status Message-id: <20150512094225.37f668eb@pwslap01u.europe.root.pri> In-reply-to: <150511194320.ZM12928@torch.brasslantern.com> References: <150511194320.ZM12928@torch.brasslantern.com> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrLLMWRmVeSWpSXmKPExsVy+t/xa7qf9wSGGtz9I2lxsPkhkwOjx6qD H5gCGKO4bFJSczLLUov07RK4Mm5NOMhcsJyjYvElzwbGk2xdjJwcEgImEiu/TmWCsMUkLtxb DxYXEljKKNG7LwjEFhGQkZg7+zFrFyMXUHwGk8TEJZvYIJxtjBLHjvxlBqliEVCV+LnhKCuI zSZgKDF102zGLkYODmYBcYnZUwJBwsJA4VWru8AW8ArYS/y+fxzM5hSwkti5s58FYrGlxOkL 58BsfgF9iat/P0EdZy8x88oZRoheQYkfk++B1TALaEls3tbECmHLS2xe85YZYo66xI27u9kn MArPQtIyC0nLLCQtCxiZVzGKppYmFxQnpeca6hUn5haX5qXrJefnbmKEBPKXHYyLj1kdYhTg YFTi4T3AHBAqxJpYVlyZe4hRgoNZSYS3tjQwVIg3JbGyKrUoP76oNCe1+BCjNAeLkjjv3F3v Q4QE0hNLUrNTUwtSi2CyTBycUg2MLvsCLPQ4PHcdctRLMJ/idK2EXYxB9eH5nRzS9s+WiJY4 rZd0klX1DOX+8+TB7xjzVycfLhYKMts+10W6nJfP8Z7SpaUajr90Fq4xtWRTc1BU8kzkjpM8 JLTUcEdVzpqPe7pL9ZNOidgy7T+XI9b87fcS+4snlwZfaeb9V6jgritUqDX3urASS3FGoqEW c1FxIgBVnfHEYAIAAA== On Mon, 11 May 2015 19:43:20 -0700 Bart Schaefer wrote: > torch% ( () { typeset +g -m \* && echo No error } ) > (anon): failed to change user ID: operation not permitted > (anon): failed to change group ID: operation not permitted > (anon): failed to change effective user ID: operation not permitted > (anon): failed to change effective group ID: operation not permitted > No error > torch% > > OK, that's not SO bad, except that "typeset +g -m \*" is intended to > have made all the variables local No, it isn't. The "g" is a bit of a snare and a delusion. "-g" means "use the global scope, never create a new variable even if you're a local scope". "+g" means "it's OK to create a new variable if you need", it doesn't mean "never use the existing variable". Remember that option letters with no argument have a binary effect in typeset and +g is the default (exactly equivalent to saying -g is not the default). You're using the -m option to refer to existing variables, so the +g has no effect. pws