diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-shells/bash/files/bash-3.2-session-leader.patch | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-shells/bash/files/bash-3.2-session-leader.patch')
-rw-r--r-- | app-shells/bash/files/bash-3.2-session-leader.patch | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/app-shells/bash/files/bash-3.2-session-leader.patch b/app-shells/bash/files/bash-3.2-session-leader.patch new file mode 100644 index 000000000000..82f7d9806333 --- /dev/null +++ b/app-shells/bash/files/bash-3.2-session-leader.patch @@ -0,0 +1,65 @@ +http://bugs.gentoo.org/231775 +http://lists.gnu.org/archive/html/bug-bash/2008-07/msg00010.html + +A parent bash shell sometimes will set the session leader tty (using tcsetpgrp) +back to itself, taking control away from a child bash shell, due to a race +condition. A result is that the child can then not then execute some commands +(like stty) from its init script (e.g. .bashrc). The result I (and others) +have seen is that the bash shell will hang while reading the init script. + +*** jobs.c.20080704 2008-07-10 15:14:13.000000000 -0400 +--- jobs.c 2008-07-10 15:17:59.000000000 -0400 +*************** +*** 266,269 **** +--- 266,270 ---- + static void set_job_running __P((int)); + static void setjstatus __P((int)); ++ static int maybe_give_terminal_to __P((pid_t, pid_t, int)); + static void mark_all_jobs_as_dead __P((void)); + static void mark_dead_jobs_as_notified __P((int)); +*************** +*** 637,641 **** + */ + if (job_control && newjob->pgrp && (subshell_environment&SUBSHELL_ASYNC) == 0) +! give_terminal_to (newjob->pgrp, 0); + } + } +--- 638,642 ---- + */ + if (job_control && newjob->pgrp && (subshell_environment&SUBSHELL_ASYNC) == 0) +! maybe_give_terminal_to (shell_pgrp, newjob->pgrp, 0); + } + } +*************** +*** 3833,3836 **** +--- 3834,3863 ---- + } + ++ /* Give terminal to NPGRP iff it's currently owned by OPGRP. FLAGS are the ++ flags to pass to give_terminal_to(). */ ++ static int ++ maybe_give_terminal_to (opgrp, npgrp, flags) ++ pid_t opgrp, npgrp; ++ int flags; ++ { ++ int tpgrp; ++ ++ tpgrp = tcgetpgrp (shell_tty); ++ if (tpgrp == npgrp) ++ { ++ terminal_pgrp = npgrp; ++ return 0; ++ } ++ else if (tpgrp != opgrp) ++ { ++ #if defined (DEBUG) ++ internal_warning ("maybe_give_terminal_to: terminal pgrp == %d shell pgrp = %d", tpgrp, opgrp); ++ #endif ++ return -1; ++ } ++ else ++ return (give_terminal_to (npgrp, flags)); ++ } ++ + /* Clear out any jobs in the job array. This is intended to be used by + children of the shell, who should not have any job structures as baggage |