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: =?UTF-8?B?T8SfdXo=?= 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: References: 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 To: Grisha Levit 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: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: Xref: csiph.com gnu.bash.bug:16614 24 Temmuz 2020 Cuma tarihinde Grisha Levit yazd=C4= =B1: > 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 > [[ $- =3D=3D *u* ]]; echo $? # 1 > [[ :$SHELLOPTS: =3D=3D *: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 > > --=20 O=C4=9Fuz