Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 311902 Details for
Bug 435159
scripts failing under ksh
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
savelist removal from jobs.c
ksh-20080202-nosavelist.patch (text/plain), 3.23 KB, created by
James M. Leddy
on 2008-07-16 01:07:11 UTC
(
hide
)
Description:
savelist removal from jobs.c
Filename:
MIME Type:
Creator:
James M. Leddy
Created:
2008-07-16 01:07:11 UTC
Size:
3.23 KB
patch
obsolete
>--- /usr/src/debug/ksh-20080202/src/cmd/ksh93/sh/jobs.c 2008-07-08 15:51:43.000000000 -0400 >+++ rpmbuild/BUILD/ksh-20080202-mucho/src/cmd/ksh93/sh/jobs.c 2008-07-15 20:40:22.000000000 -0400 >@@ -43,14 +43,13 @@ > # define WIFCONTINUED(wstat) (0) > #endif > >-#define NJOB_SAVELIST 4 > > /* > * temporary hack to get W* macros to work > */ > #undef wait > #define wait ______wait >-/* >+s/* > * This struct saves a link list of processes that have non-zero exit > * status, have had $! saved, but haven't been waited for > */ >@@ -61,34 +60,13 @@ > unsigned short exitval; > }; > >-static struct jobsave *job_savelist; >-static int njob_savelist; >- >-static void init_savelist(void) >-{ >- register struct jobsave *jp; >- while(njob_savelist < NJOB_SAVELIST) >- { >- jp = newof(0,struct jobsave,1,0); >- jp->next = job_savelist; >- job_savelist = jp; >- njob_savelist++; >- } >-} >- > /* > * return next on link list of jobsave free list > */ > static struct jobsave *jobsave_create(pid_t pid) > { >- register struct jobsave *jp = job_savelist; >- if(jp) >- { >- njob_savelist--; >- job_savelist = jp->next; >- } >- else >- jp = newof(0,struct jobsave,1,0); >+ register struct jobsave *jp = newof(0, struct jobsave,1,0); >+ jp = newof(0,struct jobsave,1,0); > if(jp) > jp->pid = pid; > return(jp); >@@ -421,8 +399,6 @@ > # if defined(SIGCLD) && (SIGCLD!=SIGCHLD) > signal(SIGCLD,job_waitsafe); > # endif >- if(njob_savelist < NJOB_SAVELIST) >- init_savelist(); > if(!sh_isoption(SH_INTERACTIVE)) > return; > /* use new line discipline when available */ >@@ -1052,8 +1028,6 @@ > free((void*)jp); > } > bck.list = 0; >- if(njob_savelist < NJOB_SAVELIST) >- init_savelist(); > job.pwlist = NIL(struct process*); > job.numpost=0; > job.waitall = 0; >@@ -1076,8 +1050,6 @@ > register struct process *pw; > register History_t *hp = sh.hist_ptr; > sh.jobenv = sh.curenv; >- if(njob_savelist < NJOB_SAVELIST) >- init_savelist(); > if(job.toclear) > { > job_clear(); >@@ -1219,11 +1191,11 @@ > * pid=-1 to wait for all runing processes > */ > >-int job_wait(register pid_t pid) >+void job_wait(register pid_t pid) > { > register struct process *pw=0,*px; > register int jobid = 0; >- int nochild = 1; >+ int nochild; > char intr = 0; > if(pid <= 0) > { >@@ -1242,13 +1214,13 @@ > sh.exitval = ERROR_NOENT; > exitset(); > job_unlock(); >- return(nochild); >+ return; > } > else if(intr && pw->p_env!=sh.curenv) > { > sh.exitval = ERROR_NOENT; > job_unlock(); >- return(nochild); >+ return; > } > jobid = pw->p_job; > if(!intr) >@@ -1362,7 +1334,7 @@ > } > job_unlock(); > if(pid==1) >- return(nochild); >+ return; > exitset(); > if(pw->p_pgrp) > { >@@ -1379,18 +1351,10 @@ > #endif /* SIGTSTP */ > } > else >- { >- if(pw->p_pid == tcgetpgrp(JOBTTY)) >- { >- if(pw->p_pgrp==0) >- pw->p_pgrp = pw->p_pid; >- job_reset(pw); >- } > tty_set(-1, 0, NIL(struct termios*)); >- } > done: > if(!job.waitall && sh_isoption(SH_PIPEFAIL)) >- return(nochild); >+ return; > if(!sh.intrap) > { > job_lock(); >@@ -1401,7 +1365,6 @@ > } > job_unlock(); > } >- return(nochild); > } > > /* >@@ -1676,14 +1639,7 @@ > else > bck.list = jp->next; > bck.count--; >- if(njob_savelist < NJOB_SAVELIST) >- { >- njob_savelist++; >- jp->next = job_savelist; >- job_savelist = jp; >- } >- else >- free((void*)jp); >+ free((void*)jp); > } > return(r); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 435159
:
310235
|
311037
|
311902
|
312590
|
323354