~ubuntu-branches/debian/sid/netatalk/sid

« back to all changes in this revision

Viewing changes to etc/afpd/main.c

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2010-11-28 13:26:40 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20101128132640-c35vd1i39kc5ul78
Tags: 2.1.4-1
* New upstream release.
* Add NEWS entry on BerkeleyDB bump to 4.8 and databases now auto-
  upgrading (replacing older testing-only entry bumping to 4.7).
  Rephrase README.Debian to mention auto-upgrading.
* Bump standards compliance to standards-version 3.9.0.
* Unfuzz patch 114.
* Update copyright file:
  + Fix document a few missed copyright holders (no new licenses).
  + Split comments in License fields into separate License-Comments
    fields.
* Ease building with git-buildpackage: Git-ignore quilt .pc dir, and
  add source local-options.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * $Id: main.c,v 1.26 2009-10-14 02:24:05 didg Exp $
3
 
 *
4
2
 * Copyright (c) 1990,1993 Regents of The University of Michigan.
5
3
 * All Rights Reserved.  See COPYRIGHT.
6
4
 */
101
99
    dsi_kill(sig);
102
100
    switch( sig ) {
103
101
    case SIGTERM :
104
 
        LOG(log_info, logtype_afpd, "shutting down on signal %d", sig );
 
102
        LOG(log_note, logtype_afpd, "AFP Server shutting down on SIGTERM");
105
103
        break;
106
104
    case SIGUSR1 :
107
105
    case SIGHUP :
188
186
        exit(0);
189
187
    }
190
188
 
191
 
#if 0
192
 
    /* Register CNID  */
193
 
    cnid_init();
194
 
#endif
195
 
 
196
189
    /* install child handler for asp and dsi. we do this before afp_goaway
197
190
     * as afp_goaway references stuff from here. 
198
191
     * XXX: this should really be setup after the initial connections. */
201
194
        LOG(log_error, logtype_afpd, "main: server_child alloc: %s", strerror(errno) );
202
195
        afp_exit(EXITERR_SYS);
203
196
    }
204
 
    
 
197
 
 
198
    memset(&sv, 0, sizeof(sv));    
205
199
#ifdef AFP3x
206
200
    /* linux at least up to 2.4.22 send a SIGXFZ for vfat fs,
207
201
       even if the file is open with O_LARGEFILE ! */
208
202
#ifdef SIGXFSZ
209
 
    signal(SIGXFSZ , SIG_IGN); 
210
 
#endif
211
 
#endif    
 
203
    sv.sa_handler = SIG_IGN;
 
204
    sigemptyset( &sv.sa_mask );
 
205
    if (sigaction(SIGXFSZ, &sv, NULL ) < 0 ) {
 
206
        LOG(log_error, logtype_afpd, "main: sigaction: %s", strerror(errno) );
 
207
        afp_exit(EXITERR_SYS);
 
208
    }
 
209
#endif
 
210
#endif
212
211
    
213
 
    memset(&sv, 0, sizeof(sv));
214
212
    sv.sa_handler = child_handler;
215
213
    sigemptyset( &sv.sa_mask );
216
214
    sigaddset(&sv.sa_mask, SIGALRM);