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
56ce79f7
Commit
56ce79f7
authored
Jun 02, 2000
by
Bruce Korb
Committed by
Bruce Korb
Jun 02, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
only shut down the server process if the master process is exiting
From-SVN: r34360
parent
ff84bb18
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
gcc/ChangeLog
+6
-0
gcc/fixinc/server.c
+6
-3
No files found.
gcc/ChangeLog
View file @
56ce79f7
2000-06-02 Bruce Korb <bkorb@gnu.org>
* fixinc/server.c(sig_handler): resume closing server on SIGPIPE
(server_setup): define the server's master pid
(close_server): actually do the deed IFF we are the server's master
2000-06-02 Jakub Jelinek <jakub@redhat.com>
2000-06-02 Jakub Jelinek <jakub@redhat.com>
* c-common.c (c_get_alias_set): Check whether signed_type did not
* c-common.c (c_get_alias_set): Check whether signed_type did not
...
...
gcc/fixinc/server.c
View file @
56ce79f7
...
@@ -84,6 +84,7 @@
...
@@ -84,6 +84,7 @@
#endif
#endif
STATIC
volatile
t_bool
read_pipe_timeout
;
STATIC
volatile
t_bool
read_pipe_timeout
;
STATIC
pid_t
server_master_pid
=
NOPROCESS
;
static
t_pchar
def_args
[]
=
static
t_pchar
def_args
[]
=
{
(
char
*
)
NULL
,
(
char
*
)
NULL
};
{
(
char
*
)
NULL
,
(
char
*
)
NULL
};
...
@@ -183,10 +184,12 @@ load_data (fp)
...
@@ -183,10 +184,12 @@ load_data (fp)
void
void
close_server
()
close_server
()
{
{
if
(
server_id
!=
NULLPROCESS
)
if
(
(
server_id
!=
NULLPROCESS
)
&&
(
server_master_pid
==
getpid
()))
{
{
kill
((
pid_t
)
server_id
,
SIGKILL
);
kill
((
pid_t
)
server_id
,
SIGKILL
);
server_id
=
NULLPROCESS
;
server_id
=
NULLPROCESS
;
server_master_pid
=
NOPROCESS
;
fclose
(
server_pair
.
pf_read
);
fclose
(
server_pair
.
pf_read
);
fclose
(
server_pair
.
pf_write
);
fclose
(
server_pair
.
pf_write
);
server_pair
.
pf_read
=
server_pair
.
pf_write
=
(
FILE
*
)
NULL
;
server_pair
.
pf_read
=
server_pair
.
pf_write
=
(
FILE
*
)
NULL
;
...
@@ -209,8 +212,6 @@ sig_handler (signo)
...
@@ -209,8 +212,6 @@ sig_handler (signo)
"fixincl ERROR: sig_handler: killed pid %ld due to %s
\n
"
,
"fixincl ERROR: sig_handler: killed pid %ld due to %s
\n
"
,
(
long
)
server_id
,
signo
==
SIGPIPE
?
"SIGPIPE"
:
"SIGALRM"
);
(
long
)
server_id
,
signo
==
SIGPIPE
?
"SIGPIPE"
:
"SIGALRM"
);
#endif
#endif
if
(
signo
==
SIGPIPE
)
return
;
close_server
();
close_server
();
read_pipe_timeout
=
BOOL_TRUE
;
read_pipe_timeout
=
BOOL_TRUE
;
}
}
...
@@ -231,6 +232,8 @@ server_setup ()
...
@@ -231,6 +232,8 @@ server_setup ()
else
else
fputs
(
"NOTE: server restarted
\n
"
,
stderr
);
fputs
(
"NOTE: server restarted
\n
"
,
stderr
);
server_master_pid
=
getpid
();
signal
(
SIGPIPE
,
sig_handler
);
signal
(
SIGPIPE
,
sig_handler
);
signal
(
SIGALRM
,
sig_handler
);
signal
(
SIGALRM
,
sig_handler
);
...
...
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