remove obsoleted ebuild
[portage-prefix-bleeding-edge-ebuilds.git] / app-shells / ksh / files / ksh-93.20080725-darwin-jobs.patch
blob94e862b2c57e9522fe5c948999311dea7f01699b
1 --- a/src/cmd/ksh93/sh/jobs.c
2 +++ b/src/cmd/ksh93/sh/jobs.c
3 @@ -36,7 +36,7 @@
4 #include "jobs.h"
5 #include "history.h"
7 -#if !defined(WCONTINUED) || !defined(WIFCONTINUED)
8 +#if !defined(WCONTINUED) || !defined(WIFCONTINUED) || defined(__APPLE__)
9 # undef WCONTINUED
10 # define WCONTINUED 0
11 # undef WIFCONTINUED
12 @@ -664,6 +664,9 @@ static void job_reset(register struct process *pw)
13 /* save the terminal state for current job */
14 #ifdef SIGTSTP
15 job_fgrp(pw,tcgetpgrp(job.fd));
16 +#ifdef SIGTTOU
17 + signal(SIGTTOU, SIG_IGN);
18 +#endif /* SIGTTOU */
19 if(tcsetpgrp(job.fd,job.mypid) !=0)
20 return;
21 #endif /* SIGTSTP */
22 @@ -1529,7 +1532,7 @@ static struct process *job_unpost(register struct process *pwtop,int notify)
23 if(pw)
24 return(pw);
25 /* all processes complete, unpost job */
26 - job_unlink(pwtop);
27 + if (pwtop) job_unlink(pwtop);
28 for(pw=pwtop; pw; pw=pw->p_nxtproc)
30 /* save the exit status for background jobs */
31 @@ -1558,7 +1561,7 @@ static struct process *job_unpost(register struct process *pwtop,int notify)
32 sfprintf(sfstderr,"ksh: job line %4d: free pid=%d critical=%d job=%d\n",__LINE__,getpid(),job.in_critical,pwtop->p_job);
33 sfsync(sfstderr);
34 #endif /* DEBUG */
35 - job_free((int)pwtop->p_job);
36 + if (pwtop) job_free((int)pwtop->p_job);
37 return((struct process*)0);