Mail Archives: cygwin-developers/1998/06/03/15:52:25
Hi,
I notice an internal cygwin error being displayed when I max
out the process table. The error:
wait_subproc: wait failed. nchildren 64, wait -1, err 87
The test program that reproduces it is below. To reproduce run the
forker. I get the error message after about 64 forks. The process
table maxes out after about 100 forks (process table size is 128 in
cygwin I believe -- does it have to be static, btw? Can we have
a dynamic process table size?). After running, you will have to
kill the processes off before being able to reproduce again.
I havent tried to debug this at all (we're working like crazy to
debug other cygwin and non-cygwin problems at the moment).
Tim N.
---- sleeper.c : compile as sleeper.exe ----
main() { sleep(60 * 2); }
---- end sleeper.c ----
---- forker.c ----
#include <signal.h>
#include <sys/types.h>
main()
{
int pid, count;
signal(SIGCLD, SIG_IGN);
for(count = 0; ; count++) {
pid = fork();
if(pid == -1) {
perror("fork");
printf("count %d\n", count);
return 0;
}
if(pid == 0) {
execl("./sleeper.exe", "sleeper", 0);
perror("execl");
exit(1);
}
printf("%d\n", count);
}
}
---- end forker.c ----
- Raw text -