diff --git a/cpuset.c b/cpuset.c index 906ed4a..29a9d2d 100644 --- a/cpuset.c +++ b/cpuset.c @@ -132,6 +132,10 @@ int main(int argc, char *argv[]) { return 1; } } + if(geteuid() != 0) { + printf("This program needs to be launched as root!\n"); + return 1; + } if(action == ACTION_ENABLE) { if(!cpu || !mem) { printf("No CPU or memory pinning specified!\n");