Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
KWSys
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
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 Willers
KWSys
Commits
7e0e434e
Commit
7e0e434e
authored
18 years ago
by
Brad King
Browse files
Options
Downloads
Patches
Plain Diff
BUG: Do not block signals during sleep. Leave that up to the application.
parent
45d62326
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SystemTools.cxx
+0
-12
0 additions, 12 deletions
SystemTools.cxx
with
0 additions
and
12 deletions
SystemTools.cxx
+
0
−
12
View file @
7e0e434e
...
...
@@ -3547,15 +3547,6 @@ void SystemTools::Delay(unsigned int msec)
#ifdef _WIN32
Sleep
(
msec
);
#else
// Block signals to make sure the entire sleep duration occurs. If
// a signal were to arrive the sleep or usleep might return early
// and there is no way to accurately know how much time was really
// slept without setting up timers.
sigset_t
newset
;
sigset_t
oldset
;
sigfillset
(
&
newset
);
sigprocmask
(
SIG_BLOCK
,
&
newset
,
&
oldset
);
// The sleep function gives 1 second resolution and the usleep
// function gives 1e-6 second resolution but on some platforms has a
// maximum sleep time of 1 second. This could be re-implemented to
...
...
@@ -3572,9 +3563,6 @@ void SystemTools::Delay(unsigned int msec)
{
usleep
(
msec
*
1000
);
}
// Restore the signal mask to the previous setting.
sigprocmask
(
SIG_SETMASK
,
&
oldset
,
0
);
#endif
}
...
...
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