Article View: gnu.bash.bug
Article #647Suspend_builtin
From: Ray Moody
Date: Sat, 30 Sep 1989 04:55
Date: Sat, 30 Sep 1989 04:55
49 lines
1855 bytes
1855 bytes
The suspend command sends a STOP signal to bash itself, but it should really
send a STOP signal to the entire process group.
Try running jove, executing bash with push-sh, and then issuing the suspend
command. You will lock up your terminal.
Ray
-----------------------------------------------------------------------------
RCS file: RCS/builtins.c,v
retrieving revision 1.3.1.1
retrieving revision 1.3.1.2
diff -c -r1.3.1.1 -r1.3.1.2
*** /tmp/,RCSt1021874 Fri Sep 29 23:44:36 1989
--- /tmp/,RCSt2021874 Fri Sep 29 23:44:41 1989
***************
*** 3222,3227
suspend_builtin (list)
WORD_LIST *list;
{
if (list)
if (strcmp (list->word->word, "-f") == 0)
--- 3222,3228 -----
suspend_builtin (list)
WORD_LIST *list;
{
+ extern int shell_pgrp;
if (list)
if (strcmp (list->word->word, "-f") == 0)
***************
*** 3236,3242
do_suspend:
old_cont = (SigHandler *)signal (SIGCONT, suspend_continue);
old_tstp = (SigHandler *)signal (SIGTSTP, SIG_DFL);
! kill (getpid (), SIGTSTP);
}
/* How to bring a job into the foreground. */
--- 3237,3243 -----
do_suspend:
old_cont = (SigHandler *)signal (SIGCONT, suspend_continue);
old_tstp = (SigHandler *)signal (SIGTSTP, SIG_DFL);
! killpg (shell_pgrp, SIGTSTP);
}
/* How to bring a job into the foreground. */
Technical Details
Message-ID:
<8909300455.AA21939@maxwell.physics.purdue.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!MAXWELL.PHYSICS.PURDUE.EDU!rayShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!MAXWELL.PHYSICS.PURDUE.EDU!ray From: ray@MAXWELL.PHYSICS.PURDUE.EDU (Ray Moody) Newsgroups: gnu.bash.bug Subject: Suspend_builtin Message-ID: <8909300455.AA21939@maxwell.physics.purdue.edu> Date: 30 Sep 89 04:55:40 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 49