Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
compctl-kam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Mareš
compctl-kam
Commits
9f6b1d32
Commit
9f6b1d32
authored
13 years ago
by
Petr Baudis
Browse files
Options
Downloads
Patches
Plain Diff
compctl --run: Automatically nice started computations
parent
f1a2312d
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
common.h
+3
-0
3 additions, 0 deletions
common.h
compctl.c
+4
-0
4 additions, 0 deletions
compctl.c
with
7 additions
and
0 deletions
common.h
+
3
−
0
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. */
...
...
This diff is collapsed.
Click to expand it.
compctl.c
+
4
−
0
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
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment