~ubuntu-branches/ubuntu/raring/clamav/raring-security

« back to all changes in this revision

Viewing changes to freshclam/freshclam.c

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2011-10-24 11:57:42 UTC
  • mfrom: (0.47.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20111024115742-8g7826vbzwi0vxyi
Tags: 0.97.3+dfsg-1ubuntu1
* Merge from Debian unstable.  Remaining changes:
  - Drop build-dep on electric-fence (in Universe)
  - Add apparmor profiles for clamd and freshclam along with maintainer
    script changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
#include "clamav.h"
51
51
 
52
52
#include "libclamav/others.h"
 
53
#include "libclamav/str.h"
53
54
 
54
55
#include "shared/optparser.h"
55
56
#include "shared/output.h"
65
66
static short foreground = 1;
66
67
char updtmpdir[512], dbdir[512];
67
68
int sigchld_wait = 1;
 
69
const char *pidfile = NULL;
68
70
 
69
71
static void sighandler(int sig) {
70
72
 
103
105
        default:
104
106
            if(*updtmpdir)
105
107
                cli_rmdirs(updtmpdir);
106
 
            logg("Update process interrupted\n");
 
108
            if(pidfile)
 
109
                unlink(pidfile);
 
110
            logg("Update process terminated\n");
107
111
            exit(2);
108
112
    }
109
113
 
223
227
int main(int argc, char **argv)
224
228
{
225
229
        int ret = 52, retcl;
226
 
        const char *cfgfile, *arg = NULL, *pidfile = NULL;
 
230
        const char *cfgfile, *arg = NULL;
227
231
        char *pt;
228
232
        struct optstruct *opts;
229
233
        const struct optstruct *opt;