Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
4c184c2c
Commit
4c184c2c
authored
May 28, 1998
by
Bruce Korb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes for POSIX-ification (I hope)
From-SVN: r20118
parent
c16b55aa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
contrib/fixinc/server.c
+12
-9
No files found.
contrib/fixinc/server.c
View file @
4c184c2c
/*
/*
* $Id: server.c,v 1.
1 1998/03/20 16:19:41
korbb Exp $
* $Id: server.c,v 1.
2 1998/05/28 09:21:29
korbb Exp $
*
*
* Server Handling copyright 1992-1998 Bruce Korb
* Server Handling copyright 1992-1998 Bruce Korb
*
*
...
@@ -368,7 +368,7 @@ sigsend (idtype, id, sig)
...
@@ -368,7 +368,7 @@ sigsend (idtype, id, sig)
STATIC
void
STATIC
void
closeServer
()
closeServer
()
{
{
sigsend
(
P_PID
,
(
id_t
)
serverId
,
SIGKILL
);
kill
(
(
p
id_t
)
serverId
,
SIGKILL
);
serverId
=
NULLPROCESS
;
serverId
=
NULLPROCESS
;
fclose
(
serverPair
.
pfRead
);
fclose
(
serverPair
.
pfRead
);
fclose
(
serverPair
.
pfWrite
);
fclose
(
serverPair
.
pfWrite
);
...
@@ -392,15 +392,18 @@ sigHandler (signo)
...
@@ -392,15 +392,18 @@ sigHandler (signo)
STATIC
void
STATIC
void
serverSetup
()
serverSetup
()
{
{
#ifndef SA_SIGINFO
# define SA_SIGINFO 0
#else
currentAction
.
sa_sigaction
=
currentAction
.
sa_sigaction
=
currentAction
.
sa_handler
=
sigHandler
;
#endif
currentAction
.
sa_flags
=
SA_SIGINFO
;
currentAction
.
sa_handler
=
sigHandler
;
sigemptyset
(
&
currentAction
.
sa_mask
);
currentAction
.
sa_flags
=
SA_SIGINFO
;
sigemptyset
(
&
currentAction
.
sa_mask
);
sigaction
(
SIGPIPE
,
&
currentAction
,
&
savePipeAction
);
sigaction
(
SIGPIPE
,
&
currentAction
,
&
savePipeAction
);
sigaction
(
SIGALRM
,
&
currentAction
,
&
saveAlrmAction
);
sigaction
(
SIGALRM
,
&
currentAction
,
&
saveAlrmAction
);
atexit
(
&
closeServer
);
atexit
(
&
closeServer
);
fputs
(
"trap : INT
\n
"
,
serverPair
.
pfWrite
);
fputs
(
"trap : INT
\n
"
,
serverPair
.
pfWrite
);
fflush
(
serverPair
.
pfWrite
);
fflush
(
serverPair
.
pfWrite
);
...
...
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