Ignore:
Timestamp:
Jan 14, 2007, 6:47:01 PM (14 years ago)
Author:
Sam Hocevar
Message:
  • Added -v/--verbose (unused yet).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/src/zzuf.c

    r1666 r1667  
    8787static int md5 = 0;
    8888static int checkexit = 0;
     89static int verbose = 0;
    8990static int maxmem = -1;
    9091static int64_t maxtime = -1;
     
    113114    for(;;)
    114115    {
    115 #   define OPTSTR "AB:cC:dD:E:F:iI:mM:nP:qr:R:s:ST:xhV"
     116#   define OPTSTR "AB:cC:dD:E:F:iI:mM:nP:qr:R:s:ST:vxhV"
    116117#   ifdef HAVE_GETOPT_LONG
    117118#       define MOREINFO "Try `%s --help' for more information.\n"
     
    140141            { "signal",      0, NULL, 'S' },
    141142            { "max-time",    1, NULL, 'T' },
     143            { "verbose",     0, NULL, 'v' },
    142144            { "check-exit",  0, NULL, 'x' },
    143145            { "help",        0, NULL, 'h' },
     
    232234        case 'x': /* --check-exit */
    233235            checkexit = 1;
     236            break;
     237        case 'v': /* --verbose */
     238            verbose = 1;
    234239            break;
    235240        case 'h': /* --help */
     
    537542            && maxbytes >= 0 && child_list[i].bytes > maxbytes)
    538543        {
    539             fprintf(stdout, "zzuf[seed=%i]: data exceeded, sending SIGTERM\n",
     544            fprintf(stdout, "zzuf[seed=%i]: data output exceeded, sending SIGTERM\n",
    540545                    child_list[i].seed);
    541546            kill(child_list[i].pid, SIGTERM);
     
    548553            && now > child_list[i].date + maxtime)
    549554        {
    550             fprintf(stdout, "zzuf[seed=%i]: time exceeded, sending SIGTERM\n",
     555            fprintf(stdout, "zzuf[seed=%i]: running time exceeded, sending SIGTERM\n",
    551556                    child_list[i].seed);
    552557            kill(child_list[i].pid, SIGTERM);
     
    764769static void usage(void)
    765770{
    766     printf("Usage: zzuf [-AcdimnqSx] [-r ratio] [-s seed | -s start:stop]\n");
    767     printf("                         [-D delay] [-F forks] [-C crashes] [-B bytes]\n");
    768     printf("                         [-T seconds] [-M bytes] [-P protect] [-R refuse]\n");
    769     printf("                         [-I include] [-E exclude] [PROGRAM [--] [ARGS]...]\n");
     771    printf("Usage: zzuf [-AcdimnqSvx] [-r ratio] [-s seed | -s start:stop]\n");
     772    printf("                          [-D delay] [-F forks] [-C crashes] [-B bytes]\n");
     773    printf("                          [-T seconds] [-M bytes] [-P protect] [-R refuse]\n");
     774    printf("                          [-I include] [-E exclude] [PROGRAM [--] [ARGS]...]\n");
    770775#   ifdef HAVE_GETOPT_LONG
    771776    printf("       zzuf -h | --help\n");
     
    800805    printf("  -S, --signal             prevent children from diverting crashing signals\n");
    801806    printf("  -T, --max-time <n>       kill children that run for more than <n> seconds\n");
     807    printf("  -v, --verbose            print information during the run\n");
    802808    printf("  -x, --check-exit         report processes that exit with a non-zero status\n");
    803809    printf("  -h, --help               display this help and exit\n");
     
    825831    printf("  -S               prevent children from diverting crashing signals\n");
    826832    printf("  -T <n>           kill children that run for more than <n> seconds\n");
     833    printf("  -v               print information during the run\n");
    827834    printf("  -x               report processes that exit with a non-zero status\n");
    828835    printf("  -h               display this help and exit\n");
Note: See TracChangeset for help on using the changeset viewer.