1. mcexec sets RLIMIT_NPROC to the number of mcexec threads. 2. do_fork() gets the current number of threads by calling rusage function. 3. do_fork() returns -EAGAIN when the limit is exceeded.
1. mcexec sets RLIMIT_NPROC to the number of mcexec threads. 2. do_fork() gets the current number of threads by calling rusage function. 3. do_fork() returns -EAGAIN when the limit is exceeded.