mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
job_reset(): fix for resetting foreground process group
Patch from OpenSUSE: https://build.opensuse.org/package/view_file/shells/ksh/ksh93-foreground-prgrp.dif src/cmd/ksh93/sh/jobs.c: job_reset(): - Only reset the foreground process group associated with the current job if the current job's process ID is different from the terminal's foreground process group ID.
This commit is contained in:
parent
9f980ba65a
commit
4645e6ad33
1 changed files with 3 additions and 1 deletions
|
@ -738,7 +738,9 @@ static void job_reset(register struct process *pw)
|
|||
{
|
||||
/* save the terminal state for current job */
|
||||
#ifdef SIGTSTP
|
||||
job_fgrp(pw,tcgetpgrp(job.fd));
|
||||
pid_t tgrp;
|
||||
if((tgrp=tcgetpgrp(job.fd))!=job.mypid)
|
||||
job_fgrp(pw,tgrp);
|
||||
if(sh_isoption(SH_INTERACTIVE) && tcsetpgrp(job.fd,job.mypid) !=0)
|
||||
return;
|
||||
#endif /* SIGTSTP */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue