Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID
	autolearn=ham autolearn_force=no version=3.4.1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=brasslantern-com.20150623.gappssmtp.com; s=20150623;
        h=mime-version:date:message-id:subject:from:to;
        bh=HYEGzJej13Ninfaad1PVdQmgD8/W01ohqBD8rqvxMHo=;
        b=oWODNceCIb1VjIgBsUnlOIG8SABrpZFLGtg019x5/fGedHhCbKSwYYk9e/8Rkwby2S
         yJ2FuPnLywQyNpAFbXRPtLXxAoB0qI3eebWtXGgrFlYFfwFWAL8/7XX1hYt6fwQkSlvT
         wa2ktbhzCmI1EtKsSzMY+9ET8yh0FQlYm0OvUxYJMfxNsmc9wjG4+CYp/3XTm8ibdlYv
         +o0XsIMSHrS6xdASRNL1uzJD/uhjiCW4yKgMtmIHYeNwZZWD1vOWsiKP+yp8Ww2T3CbI
         GbFbItQt4ETRLL3dxxuHaZshUvSN6nFPLzBfuAL3XJgRD0PGybzvrqLvh8zppViSJADW
         Q4AA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:date:message-id:subject:from:to;
        bh=HYEGzJej13Ninfaad1PVdQmgD8/W01ohqBD8rqvxMHo=;
        b=ZEmpT+hPuMY2ZiDkwKrQ5qIhWnYHeBw0IYKdiNO1eAgFaD4x5b6sGkYwWLgBCmQrSx
         6K96gAOLp3PZLmcv+Q9oZLYZ/6fd+dygSNBMLqyloFMzVBzT8xlXGGYdgL7XxUR+mFNM
         6xes7DvUy8FshuGNTu5DDIet5Z9ROmo57C/E9aPYM/xAYEqoK42V8uP+w5p8lxOddu69
         Wz47YjajEJEIrFgy9MVdVfy/PNgMCueoPY/azANphjHfy0JpV1PhBpxgIBupN+V0ZZlX
         apw2CROQ6C2jbap5REtW8AVC3RpJWXLM/Bn04g5b/cTKyiMiScZ8gWClRN0FBAlndqYq
         Io6A==
X-Gm-Message-State: AD7BkJLtz+T06xks6hPBKlKnm+EmTgjTHzWNqHym6JsUsFchW7IQVOTYT+NF5AYWDE32V0O3hQmnQNImZ4FM0A==
MIME-Version: 1.0
X-Received: by 10.194.116.9 with SMTP id js9mr23045694wjb.112.1457882452743;
 Sun, 13 Mar 2016 08:20:52 -0700 (PDT)
Date: Sun, 13 Mar 2016 08:20:52 -0700
Message-ID: <CAH+w=7ZLVXbHZcyfKnE5eYXpMkO8GYY5XPHkCdZWWnLbcsQw=A@mail.gmail.com>
Subject: TRAPCHLD (was Re: segfault in completion for configure)
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Content-Type: text/plain; charset=UTF-8
X-Seq: zsh-workers 38144

> > } On 2016-03-11 15:00:56 -0800, Bart Schaefer wrote:
> > } > [...] if you have a TRAPCHLD function it's
> > } > possible that it's corrupting something.

TRAPCHLD is a rather blunt instrument for what Vincent wants to do
here (update the window title with job status).  There's no reason to
update the title bar in the middle of a completion upon the exit from
a command substitution, but there's no way to tell why the CHLD signal
was delivered or what the surrounding shell state may be.

Any thoughts on ways to refine this?  Perhaps a job status change hook
instead of relying on a signal trap?

Semi-related, I've noticed that the CHLD trap is not executed when a
foreground job exits.  Presumably that's because wait() is reaping the
process before the signal is generated.

