From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25827 invoked by alias); 12 May 2015 02:43:31 -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: 35085 Received: (qmail 1751 invoked from network); 12 May 2015 02:43:29 -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=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:to:subject:mime-version :content-type; bh=HFx36Z7IXB6CTKpitttKWNQOfsEDoX/3jwJyaknWfLQ=; b=OiUNKxep/TzN40y/OYTU6rPeAtUpchl9q/p9W3NOKLulkrV2QUtqqLZcnhQkzce3Y1 mIoFy36tRJhw6oOdk4EEp2PCwxj+lsDE+RgPyaW5pMurJrIE7SNP5oEoWQQmWyWug2N8 eunpo0ZW+GEL6rwECW4C1ctS3tKHHRnjaArO7koW4lB7KslNhUshL9GcKf2exz/ASO0S c+1sI99O2KiFsjYYELLJQNKtOpXQ0cUaW4b7NfRmkAeyWiQ+fpNMbX0VmlCVxdabF4ks m3k388oYRSFpy2cjwE3nE6kW3GMKGK7Lf53ONOojidJn9u3BXINEtxvs5+b4Hi/ztYGF PONw== X-Gm-Message-State: ALoCoQnTYXycMMbxVbW8errJ+tjcsb+EI9hFmueWjRAiHDNdxAFszcboNy6WHb9zIvjPAoMfoYpW X-Received: by 10.202.62.212 with SMTP id l203mr9679967oia.67.1431398603697; Mon, 11 May 2015 19:43:23 -0700 (PDT) From: Bart Schaefer Message-Id: <150511194320.ZM12928@torch.brasslantern.com> Date: Mon, 11 May 2015 19:43:20 -0700 X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Failure of "typeset" and exit status MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 ... which it has NOT, as you can see (be sure to do this in a subshell if you try it yourself): torch% ( () { typeset +g -m \* && unset -m \* } && typeset -p ) (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 (anon): read-only variable: HISTCMD torch% If I add the -h flag to mask specials, it works as expected: torch% ( () { typeset +g -h -m \* && unset -m \* } && typeset -p ) typeset 0=Src/zsh ... typeset zsh_scheduled_events torch% Why did failure on those five variables result in ignoring +g for all of the other variables? And if failure is going to be treated as idempotent, shouldn't it exit nonzero? -- Barton E. Schaefer