Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Child process does not respect the limit #68

Closed
aoyama-val opened this issue Jan 2, 2017 · 1 comment
Closed

Child process does not respect the limit #68

aoyama-val opened this issue Jan 2, 2017 · 1 comment

Comments

@aoyama-val
Copy link

The readme reads

All the children processes and threads of the specified process will share the same percentage of CPU.

however,

#include <unistd.h>

int main(int argc, char *argv[])
{
    fork();
    while (1) {
    }
    return 0;
}
gcc test.c
cpulimit -l 10 ./a.out
  PID USER      PR  NI    VIRT    RES %CPU %MEM     TIME+ S COMMAND                                                                       
 9553 root      20   0    3.9m   0.1m 88.8  0.0   0:07.30 R a.out                                                                         
 9551 root      20   0    3.9m   0.6m  9.9  0.1   0:00.98 T a.out 

Linux arch03 4.8.13-1-ARCH #1 SMP PREEMPT Fri Dec 9 07:24:34 CET 2016 x86_64 GNU/Linux

@aoyama-val
Copy link
Author

Sorry, I was missing -i

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant