On Saturday 14 July 2007 22:58, Seb wrote:
> > The bug is simple: ash clears job list for children. "jobs | cat" is run
> > in child, because it's a pipe.
> > 
> > I think the following will fix it: at the end of forkchild() function
> > replace for() loop with this #if block:
> > 
> > #if JOBS
> >         /* For "jobs | cat" to work like in bash, we must retain list of 
> > jobs,
> >          * but need to remove ourself */
> >         freejob(jp);
> > #else
> >         for (jp = curjob; jp; jp = jp->prev_job)
> >                 freejob(jp);
> > #endif
> >         jobless = 0;
> > }
> 
> Great ! I tested it, it works with busybox and with dash. :)
> 
> But not with the ash shell of the Slackware, because the forkchild
> function just doesn't exist. There is just a huge forkshell function. I
> think the ancestor of the code you fixed is between line 739-745 in
> jobs.c but it's quite different from the one of dash/ash of busybox.
> 
> Should/Could I post a patch to the dash maintainer (specifying that the
> author is you, of course) ?

Yes.
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to