Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16614

Re: $SHELLOPTS after function with `local -'

Path csiph.com!4.us.feeder.erje.net!feeder.erje.net!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From Oğuz <oguzismailuysal@gmail.com>
Newsgroups gnu.bash.bug
Subject Re: $SHELLOPTS after function with `local -'
Date Fri, 24 Jul 2020 11:21:21 +0300
Lines 28
Approved bug-bash@gnu.org
Message-ID <mailman.454.1595578886.24492.bug-bash@gnu.org> (permalink)
References <CAMu=BrqQwOGPL09TJcPJXcugwHeDeeHCtmxyuS=faLJZLymCrw@mail.gmail.com> <CAH7i3LqQYjf+-vRnW+AZACBzgyuV_AwnE_-CLA1d+dg6-t3uCA@mail.gmail.com>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding quoted-printable
X-Trace usenet.stanford.edu 1595578887 12180 209.51.188.17 (24 Jul 2020 08:21:27 GMT)
X-Complaints-To action@cs.stanford.edu
Cc bug-bash <bug-bash@gnu.org>
To Grisha Levit <grishalevit@gmail.com>
Envelope-to bug-bash@gnu.org
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=FbTgG/jcqpLkXpo9dTRtIlmzYMcuBlrZd2B2lBg+uEo=; b=KD27AEKbiXxT3o1607XOwd6Dl+hoVmmR4jML0uzrR9a0gjc91A+LCi7A9Win58ZXEE 79fq07E1h3DohpxkCWlQmaFOcYwlQFR5kXIRYEeapgfl9481nP4P89xH+mfBbQDvAdFG 35TPfZzpJwlTMHDNOdwQHXs/DHGJzZ/0uf+U0BuB31ZcjYPLUY7vIMA9FAnwoGEzgy+g xfodexP8Rf/LltsB/2S54m9zhBBJ9CGtVuavuWhlIv3YntoNYRYcoFzaD3ZAP+nd1yWr leIXr1CgW9Tb7xaQsoTUBo41uaF0OtpYkkc4wgOeNmV4Hef60pqcHU6lo52O7rzamL5p nyZw==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=FbTgG/jcqpLkXpo9dTRtIlmzYMcuBlrZd2B2lBg+uEo=; b=Ioh6YD5bjdwdAARfyWf60sRJuTbL7yLkIejYqkis7BAc43tl4q/ABLD1Gf+Hqnb2Yl AHRMdXCpdtbtiDqBz0fhBar+kOairaqgqQjZ5lK/BFmIcYZWwZ3jFmTYIV0bI5xcYzvl f5HIdVTiMo5bsixYnA/A7Yk53ghOnlw4r/IG6PtES4fqFumoqiC3o2v2QQzu58NXb75T Nv4xuMJxYTdGIK4K388ZxS9uLPtklsYzNAJp9PzQ5idqRCKm7snI3cne+G0M3U/lWLoC F/PBfEwA4k5m0J2HlhhkSXwNhQ+IgFFRkaD6GurDj9gBOp8r0luM8v+gselsC3/LbUoy z1Fg==
X-Gm-Message-State AOAM533axNkEI9W3TjkiAOEfk1JXjU/GDuBFcJnnjmQNUMz+xCPwIrU2 WnD2QYd1yW/f6hXO35A6GoMECdRY3uQLn0IH3cQ=
X-Google-Smtp-Source ABdhPJzG1kg0ZMltU8lna67DpwOEpeY4IgH0hjjqzSTcVUCyZE7vYyUYQ9FJ7/ThBC+Hxfl+GsbgrNSfl71xW5RUdNI=
X-Received by 2002:a05:620a:7e7:: with SMTP id k7mr8914969qkk.420.1595578882362; Fri, 24 Jul 2020 01:21:22 -0700 (PDT)
In-Reply-To <CAMu=BrqQwOGPL09TJcPJXcugwHeDeeHCtmxyuS=faLJZLymCrw@mail.gmail.com>
Received-SPF pass client-ip=2607:f8b0:4864:20::72b; envelope-from=oguzismailuysal@gmail.com; helo=mail-qk1-x72b.google.com
X-detected-operating-system by eggs.gnu.org: No matching host in p0f cache. That's all we know.
X-Spam_score_int -20
X-Spam_score -2.1
X-Spam_bar --
X-Spam_report (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action no action
X-Content-Filtered-By Mailman/MimeDel 2.1.23
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <CAH7i3LqQYjf+-vRnW+AZACBzgyuV_AwnE_-CLA1d+dg6-t3uCA@mail.gmail.com>
X-Mailman-Original-References <CAMu=BrqQwOGPL09TJcPJXcugwHeDeeHCtmxyuS=faLJZLymCrw@mail.gmail.com>
Xref csiph.com gnu.bash.bug:16614

Show key headers only | View raw


24 Temmuz 2020 Cuma tarihinde Grisha Levit <grishalevit@gmail.com> yazdı:

> The value of $SHELLOPTS is not always updated correctly after returning
> from a function that modifies options after using `local -'.
>
>
What version of bash is this? I can't reproduce the bug on 5.0.11.


> For example:
>
>     fun() { local -; set -u; }; fun
>     [[ $- == *u* ]]; echo $?                        # 1
>     [[ :$SHELLOPTS: == *:nounset:* ]]; echo $?      # 0
>
> This seems to be the case for the following set of options:
> interactive-comments, keyword, monitor, noclobber, noglob, nolog, notify,
> nounset, onecmd, physical, pipefail, privileged, verbose, xtrace
>
> While it works correctly for:
> allexport, braceexpand, emacs, errexit, errtrace, functrace, hashall,
> histexpand, history, ignoreeof, noexec, posix, vi
>
>

-- 
Oğuz

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: $SHELLOPTS after function with `local -' Oğuz <oguzismailuysal@gmail.com> - 2020-07-24 11:21 +0300

csiph-web