use sigemptyset() and cc -Xc changes

This commit is contained in:
Jeff Hill
1996-06-21 01:07:46 +00:00
parent ad26ee285f
commit 25b5b8d5c2
+18 -8
View File
@@ -47,6 +47,9 @@
* .09 050494 pg HPUX port changes.
* .10 021694 joh ANSI C
* $Log$
* Revision 1.20 1996/06/19 18:03:17 jhill
* SIGHUP changes added by KECK
*
* Revision 1.18 1995/11/27 22:49:36 jhill
* included <arpa/inet.h>
*
@@ -60,13 +63,6 @@
static char *pSCCSID = "@(#)iocLogServer.c 1.9\t05/05/94";
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <assert.h>
#include <signal.h>
#include <unistd.h>
#include <sys/types.h>
@@ -77,6 +73,19 @@ static char *pSCCSID = "@(#)iocLogServer.c 1.9\t05/05/94";
#include <arpa/inet.h>
#include <netdb.h>
/*
* _XOPEN_SOURCE & _POSIX_C_SOURCE must not be defined
* prior to including the socket headers on solaris
*/
#define _XOPEN_SOURCE /* for solaris and "cc -Xc" */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <assert.h>
#define _POSIX_C_SOURCE 3 /* for solaris and "cc -Xc" */
#include <signal.h>
# ifdef SOLARIS
# include <sys/filio.h>
# endif
@@ -86,6 +95,7 @@ static char *pSCCSID = "@(#)iocLogServer.c 1.9\t05/05/94";
#include <envDefs.h>
#include <fdmgr.h>
static unsigned short ioc_log_port;
static long ioc_log_file_limit;
static char ioc_log_file_name[256];
@@ -187,7 +197,7 @@ int main()
* closed and re-opened, possibly with a different name.
*/
sigact.sa_handler = sighupHandler;
sigact.sa_mask = (sigset_t) 0;
sigemptyset (&sigact.sa_mask);
sigact.sa_flags = 0;
if (sigaction(SIGHUP, &sigact, NULL)){
fprintf(stderr, "iocLogServer: %s\n", strerror(errno));