Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Main
Synchronet
Commits
8dd996d4
Commit
8dd996d4
authored
19 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Stop using signals for kernel stuff... sure it's cool, but hijacking
SIGALRM isn't.
parent
1a0312e4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/odoors/ODKrnl.c
+6
-0
6 additions, 0 deletions
src/odoors/ODKrnl.c
src/odoors/ODKrnl.h
+4
-0
4 additions, 0 deletions
src/odoors/ODKrnl.h
with
10 additions
and
0 deletions
src/odoors/ODKrnl.c
+
6
−
0
View file @
8dd996d4
...
...
@@ -193,6 +193,7 @@ tODResult ODKrnlInitialize(void)
sigemptyset
(
&
(
act
.
sa_mask
));
sigaction
(
SIGHUP
,
&
act
,
NULL
);
#ifdef USE_KERNEL_SIGNAL
/* Run kernel on SIGALRM (Every .01 seconds) */
act
.
sa_handler
=
sig_run_kernel
;
act
.
sa_flags
=
SA_RESTART
;
...
...
@@ -203,6 +204,7 @@ tODResult ODKrnlInitialize(void)
itv
.
it_value
.
tv_sec
=
0
;
itv
.
it_value
.
tv_usec
=
10000
;
setitimer
(
ITIMER_REAL
,
&
itv
,
NULL
);
#endif
/* Make stdin signal driven. */
/* act.sa_handler=sig_get_char;
...
...
@@ -220,8 +222,12 @@ tODResult ODKrnlInitialize(void)
/* Make sure SIGHUP, SIGALRM, and SIGIO are unblocked */
sigemptyset
(
&
block
);
sigaddset
(
&
block
,
SIGHUP
);
#ifdef USE_KERNEL_SIGNAL
sigaddset
(
&
block
,
SIGALRM
);
#endif
#if 0
sigaddset(&block,SIGIO);
#endif
sigprocmask
(
SIG_UNBLOCK
,
&
block
,
NULL
);
#endif
...
...
This diff is collapsed.
Click to expand it.
src/odoors/ODKrnl.h
+
4
−
0
View file @
8dd996d4
...
...
@@ -66,9 +66,13 @@ tODResult ODKrnlStartChatThread(BOOL bTriggeredInternally);
#define CALL_KERNEL_IF_NEEDED()
#else
/* !OD_MULTITHREADED */
#ifdef ODPLAT_NIX
#ifdef USE_KERNEL_SIGNAL
#define CALL_KERNEL_IF_NEEDED()
#else
#define CALL_KERNEL_IF_NEEDED() od_kernel()
#endif
#else
#define CALL_KERNEL_IF_NEEDED() od_kernel()
#endif
/* !ODPLAT_NIX */
#endif
/* !OD_MULTITHREADED */
...
...
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