I've verified a few things:
1. it's not a glibc vs. libc5 issue, the same C program compiled against
either one causes the same error.
2. however, the program *must* be run on a glibc system (rh51), it doesn't
exhibit the error on a libc5 system (rh42). Note that all my systems have
compatibility libraries, glibc on rh42 and libc5 on rh51.
3. it's not a perl issue, a very simple C program (attached) will do as
well.
4. the program *must* be run from cron, doesn't matter which user.
5. the parent must *not* be blocked in the wait4() call when the child
exits; it doesn't matter what the child or the parent are doing in the
meantime as long as the parent calls wait4() *after* receiving SIGCHLD.
Can *anybody* reproduce this behavior? I refuse to believe I'm the only
one who sees it, I can reproduce it locally on 30+ boxes and two different
architectures (intel and ultrasparc)! It's simple: compile the attached C
program, run it on a rh51 box from cron, as any user, and it should send
you a mail with the message:
wait4: No child processes
Thanks,
Ion
-- It is better to keep your mouth shut and be thought a fool, than to open it and remove all doubt.------------------------ #include <stdio.h>
int main(void) { int pid; int status;
if ((pid = fork()) < 0) { perror("fork"); exit(1); }
if (pid == 0) { //child return 0; } else { //parent sleep(5); if (wait4(pid, &status, 0, NULL) < 0) perror("wait4"); } return 0; }
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/