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


Groups > gnu.bash.bug > #15619

Re: bash loses control of jobs inside a command substitution

Path csiph.com!weretis.net!feeder6.news.weretis.net!4.us.feeder.erje.net!feeder.erje.net!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail
From Robert Elz <kre@munnari.OZ.AU>
Newsgroups gnu.bash.bug
Subject Re: bash loses control of jobs inside a command substitution
Date Wed, 20 Nov 2019 21:54:53 +0700
Lines 32
Approved bug-bash@gnu.org
Message-ID <mailman.2088.1574261739.13325.bug-bash@gnu.org> (permalink)
References <CAJq09z4OWeZchYVH9U1G2OuTzdXBh+F8gLEjkqcJemohzi8dDg@mail.gmail.com> <4091.1574261693@jinx.noi.kre.to>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Trace usenet.stanford.edu 1574261740 13153 209.51.188.17 (20 Nov 2019 14:55:40 GMT)
X-Complaints-To action@cs.stanford.edu
Cc bug-bash@gnu.org
To Luiz Angelo Daros de Luca <luizluca@gmail.com>
Envelope-to bug-bash@gnu.org
In-Reply-To <CAJq09z4OWeZchYVH9U1G2OuTzdXBh+F8gLEjkqcJemohzi8dDg@mail.gmail.com>
X-detected-operating-system by eggs.gnu.org: GNU/Linux 3.x [generic]
X-Received-From 2001:3c8:9009:181::2
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 <4091.1574261693@jinx.noi.kre.to>
X-Mailman-Original-References <CAJq09z4OWeZchYVH9U1G2OuTzdXBh+F8gLEjkqcJemohzi8dDg@mail.gmail.com>
Xref csiph.com gnu.bash.bug:15619

Show key headers only | View raw


    Date:        Tue, 19 Nov 2019 16:51:12 -0300
    From:        Luiz Angelo Daros de Luca <luizluca@gmail.com>
    Message-ID:  <CAJq09z4OWeZchYVH9U1G2OuTzdXBh+F8gLEjkqcJemohzi8dDg@mail.gmail.com>

  | And two related features requests: 1) It seems that pids args are ignored
  | by wait when '-n' is specified. However, it would be a nice add_on to use
  | the list of pids as a filter. 2) 'wait -n' lacks a way to get dead child
  | PID, requiring some race conditions techniques to get it.

Both of those are in the NetBSD sh (not currently available other than
as the /bin/sh in NetBSD .. the sources are available but are not easy to
build in any other environment, yet).   I have suggested the addition of
both (#2 uses a -p var option to wait, which then places the pid of the
porcess that exited in var) to Chet - and last I heard, he was considering
them.

oguzismailuysal@gmail.com said:
  | Behavior of wait -n differs on interactive and non-interactive sessions
  | though, maybe this really is a bug

I haven't looked at the example code closely enough to comment on the
original report, but different behaviour in this area for interactive
and non-interactive shells is expected.   Interactive shells wait for
background processes by default (because users typically don't race
around typing "wait" commands) and simply clean them up whenever one
finishes.   Interactive shells don't, so scripts can actually get the
status of previously started background processes.   So the difference
noticed is probably not relevant to the original issue.

kre

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


Thread

Re: bash loses control of jobs inside a command substitution Robert Elz <kre@munnari.OZ.AU> - 2019-11-20 21:54 +0700

csiph-web