aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md (renamed from README)3
-rw-r--r--src/cpulimit.c4
-rw-r--r--tests/process_iterator_test.c2
3 files changed, 5 insertions, 4 deletions
diff --git a/README b/README.md
index af00bf9..019579d 100644
--- a/README
+++ b/README.md
@@ -1,9 +1,6 @@
CPULIMIT
========
-About
------
-
Cpulimit is a tool which limits the CPU usage of a process (expressed in percentage, not in CPU time). It is useful to control batch jobs, when you don't want them to eat too many CPU cycles. The goal is prevent a process from running for more than a specified time ratio. It does not change the nice value or other scheduling priority settings, but the real CPU usage. Also, it is able to adapt itself to the overall system load, dynamically and quickly.
The control of the used CPU amount is done sending SIGSTOP and SIGCONT POSIX signals to processes.
All the children processes and threads of the specified process will share the same percentage of CPU.
diff --git a/src/cpulimit.c b/src/cpulimit.c
index dc61c3b..50eabea 100644
--- a/src/cpulimit.c
+++ b/src/cpulimit.c
@@ -43,6 +43,10 @@
#include <sys/types.h>
#include <sys/wait.h>
+#ifdef __APPLE__ || __FREEBSD__
+#include <libgen.h>
+#endif
+
#include "process_group.h"
#include "list.h"
diff --git a/tests/process_iterator_test.c b/tests/process_iterator_test.c
index 20ef479..1615196 100644
--- a/tests/process_iterator_test.c
+++ b/tests/process_iterator_test.c
@@ -28,7 +28,7 @@
#include <signal.h>
#include <string.h>
-#ifdef __APPLE__
+#ifdef __APPLE__ || __FREEBSD__
#include <libgen.h>
#endif
Un proyecto texto-plano.xyz