Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Mareš
compctl-kam
Commits
9f6b1d32
Commit
9f6b1d32
authored
Mar 07, 2012
by
Petr Baudis
Browse files
compctl --run: Automatically nice started computations
parent
f1a2312d
Changes
2
Hide whitespace changes
Inline
Side-by-side
common.h
View file @
9f6b1d32
...
...
@@ -15,6 +15,9 @@ size_t static_minfree = 512*1048576UL;
size_t
static_maxfree
=
2048
*
1048576UL
;
double
split_ratio
=
0
.
5
;
/* Default nice value for processes started using compctl --run. */
#define COMPNICE 12
/* Other common definitions. */
/* See README for the high-level protocol description. */
...
...
compctl.c
View file @
9f6b1d32
...
...
@@ -4,6 +4,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/resource.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <unistd.h>
...
...
@@ -104,6 +105,9 @@ run(int argc, char *argv[])
}
free
(
line
);
if
(
setpriority
(
PRIO_PROCESS
,
0
,
COMPNICE
)
<
0
)
perror
(
"Warning: setpriority()"
);
char
*
argvx
[
argc
+
1
];
for
(
int
i
=
0
;
i
<
argc
;
i
++
)
argvx
[
i
]
=
argv
[
i
];
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment