~ubuntu-branches/debian/experimental/nfs-utils/experimental

« back to all changes in this revision

Viewing changes to utils/nhfsstone/nhfsstone.c

  • Committer: Bazaar Package Importer
  • Author(s): Anibal Monsalve Salazar
  • Date: 2006-07-08 14:26:40 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20060708142640-r171kjj2a13gy2kz
Tags: 1:1.0.9-1
* Updated co-mantainer mail address.
* New upstream release.
  - Added 'mount.nfs' utility which can be used as a mount helper
    to mount nfs filesystems. It does not yet support 'user' mounts.
  - Makefile/autoconf tidyups
  - No compiles with no warnings
  - deleted debian/* at request of debian maintainer
  - deleted assorted other unused files
  - mountd can be run multi-threaded for configurations with many hundreds
    of clients (mountd -t 20).  Default is single-threaded
  - Support for selection NFS version to be exported, and protocol to
    use.  This requires kernel patches that should be in linux 2.6.19.
  - Use 65534 rather than -2 for default anon.  This makes no difference in many
    cases, but is important in some.
  - New utility 'rpcdebug' for controlled kernel 'debug' options for nfs and nfsd.
  - nfsstat reports NFSv4 operation statistics that should be available in
    linux 2.6.18.
  - assorted other fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef lint
 
1
#if 0
2
2
static char sccsid[] = "@(#)nhfsstone.c 1.22 90/05/08 Copyright (c) 1990, Legato Systems Inc";
3
3
#endif
4
4
 
10
10
 * Ported to Linux by Olaf Kirch <okir@monad.swb.de>
11
11
 */
12
12
 
 
13
#include "config.h"
13
14
#include <stdio.h>
14
15
#include <stdlib.h>
15
16
#include <unistd.h>
312
313
        int pid;                /* process id */
313
314
        int delay;              /* msecs since last checked current time */
314
315
        int randnum;            /* a random number */
 
316
#if HAVE_SIGPROCMASK
 
317
        sigset_t oldmask;       /* saved signal mask */
 
318
#else
315
319
        int oldmask;            /* saved signal mask */
 
320
#endif
316
321
        int sampletime;         /* secs between reading kernel stats */
317
322
        char *opts;             /* option parsing */
318
323
        int pct;
478
483
 
479
484
        (void) signal(SIGINT, cleanup);
480
485
        (void) signal(SIGUSR1, startup);
 
486
#if HAVE_SIGPROCMASK
 
487
        {
 
488
                sigset_t mask;
 
489
                sigemptyset(&mask);
 
490
                sigaddset(&mask, SIGUSR1);
 
491
                sigprocmask(SIG_BLOCK, &mask, &oldmask);
 
492
        }
 
493
#else
 
494
        /*
 
495
         * sigblock() is marked deprecated in modern
 
496
         * glibc and hence generates a warning.
 
497
         */
481
498
        oldmask = sigblock(sigmask(SIGUSR1));
 
499
#endif
482
500
 
483
501
        if (ncalls == 0) {
484
502
                if (runtime == 0) {
630
648
                exit(1);
631
649
        }
632
650
 
 
651
#if HAVE_SIGPROCMASK
 
652
        sigsuspend(&oldmask);
 
653
#else
633
654
        sigpause(oldmask);
 
655
#endif
634
656
 
635
657
        /*
636
658
         * Initialize counters