Path: csiph.com!goblin2!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Jonathan Rascher Newsgroups: gnu.bash.bug Subject: Re: Shell exits after process substitution when using DEBUG trap with extdebug Date: Tue, 4 Aug 2020 09:29:32 -0500 Lines: 36 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" X-Trace: usenet.stanford.edu 1596551388 16342 209.51.188.17 (4 Aug 2020 14:29:48 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bug-bash@gnu.org To: chet.ramey@case.edu Envelope-to: bug-bash@gnu.org X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pgnL3IilVs/HKy6+LhiZAGvV31Y1Gnu67dRRNJ6p4NY=; b=YPN3H07izELvWiL6BO1PA8oOU0s/d+YBSDy9ACaLgOR6fy2plYStyGWpxUfV4au8gj tH//WTWmNeLqe33WhBkIoEJcznx+MRZdOZdINEYOMAwCIyoKO+HKup7+Rx8uw4phQWS1 rCL7MajO3GTFmewCAApKKR+GMaHbhaDADLD0wngy4vXvf1E9SE5S1/SqmA9OU2vgJCAS 7KfBPMSuZIsUeCh/179DJxEKdHlpJdeoM56oJbIxA1AiOdo4/UpGOaDFYuTVPy4ak8Ff 3X4/vveQgHT2CiZAgsnK99+LRmXvw3GHXlBwT3mzmVjVETbWUCbLcLLDOX9Y7HKuVwiA vZQw== X-Gm-Message-State: AOAM533lFHulHSBldYSkcFBs33G0HxCAUXkJTSF+3e8YhJ0MOUS734UT n0RMsLPzGwo28ppYuCGlBdT2Lbdn0uylfGJjb1o= X-Google-Smtp-Source: ABdhPJxhIzy8Ym8LYm0ri1RAmF4HKGn34rxs+FCG2b3PNT+S5u31azaiWfbBAJUael5bBbPT6kUwMA31/7/a2VBaJng= X-Received: by 2002:a2e:3304:: with SMTP id d4mr9253022ljc.115.1596551382391; Tue, 04 Aug 2020 07:29:42 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=209.85.208.195; envelope-from=jrascher@gmail.com; helo=mail-lj1-f195.google.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/04 10:29:42 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=1, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:16691 On Tue, Aug 4, 2020 at 9:20 AM Chet Ramey wrote: > On 8/3/20 9:44 PM, Jonathan Rascher wrote: > > $ bash --version > > GNU bash, version 5.0.3(1)-release (x86_64-pc-linux-gnu) > > > > $ uname -a > > Linux penguin 5.4.40-04224-g891a6cce2d44 #1 SMP PREEMPT Tue Jun 23 > 20:21:29 > > PDT 2020 x86_64 GNU/Linux > > > > (This is a Pixelbook running the default Crostini Linux VM under Chrome > > OS 84.0.4147.110. I can reproduce the issue on regular Debian too, > though.) > > > > To reproduce, run the following commands: > > > > shopt -s extdebug > > trap : DEBUG > > : < <(:) > > Thanks for the report. I can't reproduce this with macOS, but I can with > RHEL 7. I'll take a look. > Thanks! The EOF hunch made me decide to see what happened with ignoreeof set. Sure enough, instead of exiting when I type the first character after the command with the process substitution, bash just prints `Use "exit" to leave the shell.` And then the character I actually typed is still echoed to the console, and I can keep using the shell. (It doesn't exit if ignoreeof is set.) Cheers, Jon