Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
why3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
125
Issues
125
List
Boards
Labels
Service Desk
Milestones
Merge Requests
17
Merge Requests
17
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Why3
why3
Commits
c4416c9a
Commit
c4416c9a
authored
Mar 15, 2016
by
Guillaume Melquiond
Committed by
Andrei Paskevich
Mar 15, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not set a wallclock time limit if there is no time limit.
parent
2946eca7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
src/tools/cpulimit.c
src/tools/cpulimit.c
+11
-9
No files found.
src/tools/cpulimit.c
View file @
c4416c9a
...
@@ -82,15 +82,17 @@ int main(int argc, char *argv[]) {
...
@@ -82,15 +82,17 @@ int main(int argc, char *argv[]) {
if
(
pid
>
0
)
{
if
(
pid
>
0
)
{
int
status
;
int
status
;
pid_t
p
;
pid_t
p
;
struct
sigaction
sa
;
if
(
timelimit
)
{
/* set a wallclock time limit as last resort */
/* set a wallclock time limit as last resort */
struct
sigaction
sa
;
sa
.
sa_handler
=
&
wallclock_timelimit_reached
;
sa
.
sa_handler
=
&
wallclock_timelimit_reached
;
sigemptyset
(
&
sa
.
sa_mask
);
sigemptyset
(
&
sa
.
sa_mask
);
sa
.
sa_flags
=
0
;
sa
.
sa_flags
=
0
;
sigaction
(
SIGALRM
,
&
sa
,
NULL
);
sigaction
(
SIGALRM
,
&
sa
,
NULL
);
wallclock_timelimit
=
2
*
timelimit
+
60
;
wallclock_timelimit
=
2
*
timelimit
+
60
;
alarm
(
wallclock_timelimit
);
alarm
(
wallclock_timelimit
);
}
/* wait for the subprocess */
/* wait for the subprocess */
p
=
waitpid
(
pid
,
&
status
,
0
);
p
=
waitpid
(
pid
,
&
status
,
0
);
...
...
Write
Preview
Markdown
is supported
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