diff options
author | Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> | 1999-05-07 08:42:27 +0000 |
---|---|---|
committer | Bruce Korb <korbb@gcc.gnu.org> | 1999-05-07 08:42:27 +0000 |
commit | f6a65b927daf4fecf22211e9be10fc8aaebddc3a (patch) | |
tree | 83a303ac3e57071f72dd34c4f65c8163ab669934 /gcc/fixinc/server.c | |
parent | 02c325c4ce2e5caf61831576897c416d97691b13 (diff) | |
download | gcc-f6a65b927daf4fecf22211e9be10fc8aaebddc3a.zip gcc-f6a65b927daf4fecf22211e9be10fc8aaebddc3a.tar.gz gcc-f6a65b927daf4fecf22211e9be10fc8aaebddc3a.tar.bz2 |
don't \\-escape the cd command + format fix
From-SVN: r26813
Diffstat (limited to 'gcc/fixinc/server.c')
-rw-r--r-- | gcc/fixinc/server.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gcc/fixinc/server.c b/gcc/fixinc/server.c index 51f86b5..e803e0a 100644 --- a/gcc/fixinc/server.c +++ b/gcc/fixinc/server.c @@ -86,9 +86,9 @@ #define NUL '\0' #endif -STATIC bool read_pipe_timeout; +STATIC volatile bool read_pipe_timeout; -STATIC t_pchar def_args[] = +static t_pchar def_args[] = { (char *) NULL, (char *) NULL }; STATIC t_pf_pair server_pair = { (FILE *) NULL, (FILE *) NULL }; @@ -149,7 +149,8 @@ load_data (fp) p = realloc ((void *) pz_text, text_size); if (p == (void *) NULL) { - fprintf (stderr, "Failed to get 0x%08X bytes\n", text_size); + fprintf (stderr, "Failed to get 0x%08lX bytes\n", + (long) text_size); free ((void *) pz_text); return (char *) NULL; } @@ -201,6 +202,12 @@ static void sig_handler (signo) int signo; { +#ifdef DEBUG + /* FIXME: this is illegal to do in a signal handler. */ + fprintf (stderr, + "fixincl ERROR: sig_handler: killed pid %ld due to %s\n", + (long) server_id, signo == SIGPIPE ? "SIGPIPE" : "SIGALRM"); +#endif close_server (); read_pipe_timeout = BOOL_TRUE; } @@ -273,7 +280,7 @@ run_shell (pz_cmd) /* Make sure the process will pay attention to us, send the supplied command, and then have it output a special marker that we can find. */ - fprintf (server_pair.pf_write, "\\cd %s\n%s\n\necho\necho %s\n", + fprintf (server_pair.pf_write, "cd %s\n%s\n\necho\necho %s\n", p_cur_dir, pz_cmd, z_done); fflush (server_pair.pf_write); |