diff options
author | korbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-05-28 09:21:29 +0000 |
---|---|---|
committer | korbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-05-28 09:21:29 +0000 |
commit | 0cfc758eb823bbb0d092e0d1b3f6fe3637d5c628 (patch) | |
tree | 988b8ef4d7349931b146b238fdd85459261a205d /contrib | |
parent | 9953708dc35ea54d2fe1061ada83c49cc3085820 (diff) | |
download | gcc-0cfc758eb823bbb0d092e0d1b3f6fe3637d5c628.tar.gz |
Changes for POSIX-ification (I hope)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@20118 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/fixinc/server.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/contrib/fixinc/server.c b/contrib/fixinc/server.c index 503bc9394fa..381897181d0 100644 --- a/contrib/fixinc/server.c +++ b/contrib/fixinc/server.c @@ -1,6 +1,6 @@ /* - * $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 * @@ -368,7 +368,7 @@ sigsend (idtype, id, sig) STATIC void closeServer () { - sigsend (P_PID, (id_t) serverId, SIGKILL); + kill( (pid_t) serverId, SIGKILL); serverId = NULLPROCESS; fclose (serverPair.pfRead); fclose (serverPair.pfWrite); @@ -392,15 +392,18 @@ sigHandler (signo) STATIC void serverSetup () { - +#ifndef SA_SIGINFO +# define SA_SIGINFO 0 +#else currentAction.sa_sigaction = - currentAction.sa_handler = sigHandler; - currentAction.sa_flags = SA_SIGINFO; - sigemptyset (¤tAction.sa_mask); +#endif + currentAction.sa_handler = sigHandler; + currentAction.sa_flags = SA_SIGINFO; + sigemptyset( ¤tAction.sa_mask ); - sigaction (SIGPIPE, ¤tAction, &savePipeAction); - sigaction (SIGALRM, ¤tAction, &saveAlrmAction); - atexit (&closeServer); + sigaction( SIGPIPE, ¤tAction, &savePipeAction ); + sigaction( SIGALRM, ¤tAction, &saveAlrmAction ); + atexit( &closeServer ); fputs ("trap : INT\n", serverPair.pfWrite); fflush (serverPair.pfWrite); |