mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Fix crash in backtick comsubs
with job control on (rhbz#825520)
This imports another fix from Red Hat/Fedora. Original patch:
642af4d6/f/ksh-20120801-crash.patch
src/cmd/ksh93/include/jobs.h,
src/cmd/ksh93/sh/jobs.c,
src/cmd/ksh93/sh/subshell.c,
src/cmd/ksh93/sh/xec.c:
- Import the Red Hat fix with these differences:
- Rename the 'hack1_waitall' variable to 'bktick_waitall' and add
a comment describing what it's for.
- Remove unused 'pipefail' variable.
src/cmd/ksh93/tests/basic.sh:
- Regression test from reproducer given in the Red Hat bug report.
- Add special handling to SIGKILL it, as it might freeze hard.
This commit is contained in:
parent
f7ffaaba17
commit
ce68e1be37
7 changed files with 32 additions and 3 deletions
|
@ -1927,7 +1927,7 @@ int sh_exec(register const Shnode_t *t, int flags)
|
|||
memset(exitval,0,job.waitall*sizeof(int));
|
||||
}
|
||||
else
|
||||
job.waitall |= !pipejob && sh_isstate(SH_MONITOR);
|
||||
job.waitall |= (job.bktick_waitall || !pipejob && sh_isstate(SH_MONITOR));
|
||||
job_lock();
|
||||
nlock++;
|
||||
do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue