~ubuntu-branches/ubuntu/hardy/cvsd/hardy

« back to all changes in this revision

Viewing changes to cvsd.c

  • Committer: Bazaar Package Importer
  • Author(s): Arthur de Jong
  • Date: 2007-12-07 16:00:00 UTC
  • Revision ID: james.westby@ubuntu.com-20071207160000-egu92tsbnn9huzzg
Tags: 1.0.14
* added Vcs-Cvs, Vcs-Browser and Homepage fields
* better cvsd user and group removal commands on purge
* some typo fixes in documentation and other minor fixes in the code

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 
15
15
   Copyright (C) 1999 Chris Black.
16
16
   Copyright (C) 2000 Philippe Kehl.
17
 
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Arthur de Jong.
 
17
   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Arthur de Jong.
18
18
 
19
19
   This program is free software; you can redistribute it and/or modify
20
20
   it under the terms of the GNU General Public License as published by
123
123
{
124
124
  fprintf(fp,"%s\n",PACKAGE_STRING);
125
125
  fprintf(fp,"Written by Chris Black, Philippe Kehl and Arthur de Jong.\n\n");
126
 
  fprintf(fp,"Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Chris Black,\n"
127
 
             "Philippe Kehl and Arthur de Jong.\n"
 
126
  fprintf(fp,"Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Chris\n"
 
127
             "Black, Philippe Kehl and Arthur de Jong.\n"
128
128
             "This is free software; see the source for copying conditions.  There is NO\n"
129
129
             "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n");
130
130
}
314
314
static void handleconnection(int csock,const struct cvsd_cfg *cfg)
315
315
{
316
316
  pid_t cpid;
317
 
  int i,m;
 
317
  int i;
 
318
  long m;
318
319
 
319
320
  /* we have a possible race here? (probably atomic) */
320
321
  cvsd_numchildren++;
335
336
    }
336
337
    /* close all other file descriptors */
337
338
    m=sysconf(_SC_OPEN_MAX);
 
339
    /* if the system does not have OPEN_MAX just close the first 32 and
 
340
       hope we closed enough */
 
341
    if (m<0)
 
342
      m=32;
338
343
    for (i=3;i<m;i++)
339
344
      close(i);
340
345
    /* execute cvs */