/*
- * $Id: main.c,v 1.26 2009-10-14 02:24:05 didg Exp $
- *
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
switch( sig ) {
case SIGTERM :
- LOG(log_info, logtype_afpd, "shutting down on signal %d", sig );
+ LOG(log_note, logtype_afpd, "AFP Server shutting down on SIGTERM");
AFPConfig *config;
for (config = configs; config; config = config->next)
if (config->server_cleanup)
set_auth_parameters( ac, av );
#endif /* TRU64 */
-#ifdef DEBUG1
+ /* Log SIGBUS/SIGSEGV SBT */
fault_setup(NULL);
-#endif
+
afp_options_init(&default_options);
if (!afp_options_parse(ac, av, &default_options))
exit(EXITERR_CONF);
LOG(log_error, logtype_afpd, "main: server_child alloc: %s", strerror(errno) );
afp_exit(EXITERR_SYS);
}
-
+
+ memset(&sv, 0, sizeof(sv));
#ifdef AFP3x
/* linux at least up to 2.4.22 send a SIGXFZ for vfat fs,
even if the file is open with O_LARGEFILE ! */
#ifdef SIGXFSZ
- signal(SIGXFSZ , SIG_IGN);
+ sv.sa_handler = SIG_IGN;
+ sigemptyset( &sv.sa_mask );
+ if (sigaction(SIGXFSZ, &sv, NULL ) < 0 ) {
+ LOG(log_error, logtype_afpd, "main: sigaction: %s", strerror(errno) );
+ afp_exit(EXITERR_SYS);
+ }
+#endif
#endif
-#endif
- memset(&sv, 0, sizeof(sv));
sv.sa_handler = child_handler;
sigemptyset( &sv.sa_mask );
sigaddset(&sv.sa_mask, SIGALRM);