Public bug reported:

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)

** Affects: zsh (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug xenial

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1677082

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zsh/+bug/1677082/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to