void pids_init(void) { if (read_pid_max()) { #ifdef __x86_64__ pidmax = 4194304; #else pidmax = 32768; #endif printf("Couldn't read pid_max from proc\n"); } printf("Using pid_max = %d\n", pidmax); }
void pids_init(void) { unsigned int i; if (read_pid_max()) { #ifdef __x86_64__ pidmax = 4194304; #else pidmax = 32768; #endif outputerr("Couldn't read pid_max from proc\n"); } output(0, "Using pid_max = %d\n", pidmax); pids = alloc_shared(max_children * sizeof(int)); for_each_child(i) pids[i] = EMPTY_PIDSLOT; }