From the 20080202 release, in function job_unpost, jobs.c:285
if(bck.count++ > sh.lim.child_max)
job_chksave(0);
if(jp = jobsave_create(pid))
{
jp->next = bck.list;
bck.list = jp;
jp->exitval = 0;
}
I'm not extremely familiar with the code, but shouldn't this be ++bck.count?
Currently it allows for you to put sh.lim.child_max+1 elements into
bck.list, which seems to me like 1 to many.
proposed patch attached.
--- src/cmd/ksh93/sh/jobs.c 2008-05-23 12:15:22.000000000 -0400
+++ src/cmd/ksh93/sh/jobs.offbyone.c 2008-06-17 15:29:17.000000000 -0400
@@ -1519,7 +1519,7 @@ static struct process *job_unpost(regist
{
struct jobsave *jp;
/* save status for future wait */
- if(bck.count++ > sh.lim.child_max)
+ if(++bck.count > sh.lim.child_max)
job_chksave(0);
if(jp = jobsave_create(pw->p_pid))
{
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers