Le Sat, 14 Jul 2007 19:20:06 +0100 Denis Vlasenko <[EMAIL PROTECTED]> a écrit:
Hello, > 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) ? ++ Seb. _______________________________________________ busybox mailing list [email protected] http://busybox.net/cgi-bin/mailman/listinfo/busybox
