Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 597928 - shell suspend won't work
shell suspend won't work
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Ondrej Vasik
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2010-05-30 22:50 EDT by doug
Modified: 2012-02-08 17:59 EST (History)
9 users (show)

See Also:
Fixed In Version: coreutils-8.12-6.fc16
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 681598 (view as bug list)
Last Closed: 2011-08-23 09:05:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
change to 1.22 file: properly propagate upstream stop signals in su (12.72 KB, patch)
2010-07-03 18:25 EDT, Tim Eliseo
no flags Details | Diff

  None (edit)
Description doug 2010-05-30 22:50:46 EDT
Description of problem:

I've seen this in Fedora 13 and 11. I know that is used to work at least as far back as Fedora7, I'm not sure when it broke.

How reproducible:

Steps to Reproduce:
1. log in a user with tcsh shell
2. become root via su
3. type "suspend"
Actual results:

Nothing happens, you stay as root

Expected results:

It should do "Suspended (signal)" and put you back into your user shell

Additional info:
Comment 1 Tim Eliseo 2010-07-03 18:25:42 EDT
Created attachment 429307 [details]
change to 1.22 file: properly propagate upstream stop signals in su

This is actually not a bug with tcsh, but with /bin/su in coreutils. The following recent change broke the behavior of "suspend" in tcsh, and affects Fedora 11, 12, 13, and rawhide:


The issue lies with su attempting to propagate stop signals from its child (tcsh) to itself, which will notify its parent (presumably another shell). The previous version (1.21) was incorrect in that it always sent itself a SIGSTOP regardless of what type of signal was received (the "suspend" command in tcsh sends a SIGTSTP). This worked because SIGSTOP can't be blocked (masked). The 1.22 version attempted to fix this by directly propagating the signal, but failed for SIGTSTP because it was blocked. My patch fixes both problems. The relevant code change is:

+  /* tcsh sends SIGTSTP to the process group, and so is already pending */
   kill(getpid(), WSTOPSIG(status));
+  if (WSTOPSIG(status) != SIGSTOP) {
+    sigemptyset(&blockset);
+    sigaddset(&blockset, WSTOPSIG(status));
+    sigprocmask(SIG_UNBLOCK, &blockset, &ourset);
+    /* signal taken here */
+    sigprocmask(SIG_SETMASK, &ourset, NULL);
+  }
Comment 2 Chris Osborn 2010-07-26 14:18:07 EDT
I've been having the same problem on both Fedora 12 and 13. So fare my workaround has been:

alias suspend kill -STOP $$
Comment 3 Fedora Admin XMLRPC Client 2010-11-01 07:16:32 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 4 Vojtech Vitek 2011-04-14 11:08:32 EDT
Moving bz to coreutils component.
Comment 5 Bug Zapper 2011-06-02 08:42:48 EDT
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
Comment 6 Chris Osborn 2011-06-02 10:09:04 EDT
This bug still exists on Fedora 14
Comment 7 Ondrej Vasik 2011-08-23 09:05:00 EDT
Fixed in coreutils-8.12-6.fc17 .
Comment 8 Fedora Update System 2012-01-30 08:05:43 EST
coreutils-8.12-6.fc16 has been submitted as an update for Fedora 16.
Comment 9 Fedora Update System 2012-02-08 17:59:48 EST
coreutils-8.12-6.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.