after suspend and bg, normally running pipeline job labeled "unknown signal (core dumped)"

Bug #1677082 reported by Nathan Dorfman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zsh
Fix Released
Undecided
Unassigned
zsh (Debian)
New
Unknown
zsh (Ubuntu)
New
Undecided
Unassigned

Bug Description

When a pipeline job is suspended and then backgrounded, 'jobs -l' incorrectly lists the status of all but the first command in the pipeline.

For example:

% cp /dev/null /tmp/emptyfile && tail -F /tmp/emptyfile | fgrep hello | sed 's/^/received: /'
^Z
zsh: suspended tail -F /tmp/emptyfile | fgrep hello | sed 's/^/received: /'
% jobs -l
[1] + 8096 suspended tail -F /tmp/emptyfile |
       8097 suspended fgrep hello |
       8098 suspended sed 's/^/received: /'

The confusion begins after the 'bg' command:

% bg
[1] + continued tail -F /tmp/emptyfile | fgrep hello | sed 's/^/received: /'
% jobs -l
[1] + 8096 running tail -F /tmp/emptyfile |
       8097 unknown signal (core dumped) fgrep hello |
       8098 unknown signal (core dumped) sed 's/^/received: /'

The status above is wrong; both fgrep and sed are in fact running fine:

% echo hello world >> /tmp/emptyfile
% kill 8096 # flush the pipeline
% received: hello world

[1] + terminated tail -F /tmp/emptyfile |
       done fgrep hello | sed 's/^/received: /'
%

Note also that the final status, printed when the commands actually exit, is correct ('done').

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: zsh 5.1.1-1ubuntu2
ProcVersionSignature: Ubuntu 4.4.0-70.91-generic 4.4.49
Uname: Linux 4.4.0-70-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
CurrentDesktop: GNOME-Flashback:Unity
Date: Tue Mar 28 18:58:32 2017
InstallationDate: Installed on 2017-03-27 (1 days ago)
InstallationMedia: Ubuntu 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
SourcePackage: zsh
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Nathan Dorfman (ndorf) wrote :
Nathan Dorfman (ndorf)
no longer affects: zsh
Changed in zsh (Debian):
status: Unknown → New
Revision history for this message
Nathan Dorfman (ndorf) wrote :

Fixed in upstream versions 5.4+ and debian-testing

Changed in zsh:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.