- Timestamp:
- Jan 9, 2007, 12:22:09 PM (14 years ago)
- Location:
- zzuf/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
zzuf/trunk/doc/zzuf.1
r1633 r1634 61 61 is 1, meaning \fBzzuf\fR will stop as soon as one child has crashed. A process 62 62 is considered to have crashed if any signal (such as, but not limited to, 63 \fBSIGSEGV\fR) caused it to exit. 63 \fBSIGSEGV\fR) caused it to exit. If the \fB\-x\fR flag is used, this will 64 also include processes that exit with a non-zero status. 64 65 65 66 This option is only relevant if the \fB\-s\fR flag is used with an interval … … 189 190 situations. See also the \fB\-B\fR flag. 190 191 .TP 192 \fB\-x\fR, \fB\-\-check\-exit\fR 193 Report processes that exit with a non-zero status. By default only processes 194 that crash due to a signal are reported. 195 .TP 191 196 \fB\-h\fR, \fB\-\-help\fR 192 197 Display a short help message and exit. -
zzuf/trunk/src/zzuf.c
r1633 r1634 80 80 static int maxbytes = -1; 81 81 static int md5 = 0; 82 static int checkexit = 0; 82 83 static double maxtime = -1.0; 83 84 … … 127 128 { "signal", 0, NULL, 'S' }, 128 129 { "max-time", 1, NULL, 'T' }, 130 { "check-exit", 0, NULL, 'x' }, 129 131 { "help", 0, NULL, 'h' }, 130 132 { "version", 0, NULL, 'v' }, 131 133 }; 132 int c = getopt_long(argc, argv, "B:cC:dE:F:iI:MnP:qr:R:s:ST: hv",134 int c = getopt_long(argc, argv, "B:cC:dE:F:iI:MnP:qr:R:s:ST:xhv", 133 135 long_options, &option_index); 134 136 # else 135 137 # define MOREINFO "Try `%s -h' for more information.\n" 136 int c = getopt(argc, argv, "B:cC:dE:F:iI:MnP:qr:R:s:ST: hv");138 int c = getopt(argc, argv, "B:cC:dE:F:iI:MnP:qr:R:s:ST:xhv"); 137 139 # endif 138 140 if(c == -1) … … 206 208 case 'T': /* --max-time */ 207 209 maxtime = atof(optarg); 210 break; 211 case 'x': /* --check-exit */ 212 checkexit = 1; 208 213 break; 209 214 case 'h': /* --help */ … … 516 521 continue; 517 522 518 if( WIFEXITED(status) && WEXITSTATUS(status))523 if(checkexit && WIFEXITED(status) && WEXITSTATUS(status)) 519 524 { 520 525 fprintf(stdout, "zzuf[seed=%i]: exit %i\n", … … 660 665 static void usage(void) 661 666 { 662 printf("Usage: zzuf [-cdiMnqS ] [-r ratio] [-s seed | -s start:stop]\n");663 printf(" [-F forks] [-C crashes] [-B bytes] [-T seconds]\n");664 printf(" [-P protect] [-R refuse]\n");665 printf(" [-I include] [-E exclude] [PROGRAM [ARGS]...]\n");667 printf("Usage: zzuf [-cdiMnqSx] [-r ratio] [-s seed | -s start:stop]\n"); 668 printf(" [-F forks] [-C crashes] [-B bytes] [-T seconds]\n"); 669 printf(" [-P protect] [-R refuse]\n"); 670 printf(" [-I include] [-E exclude] [PROGRAM [ARGS]...]\n"); 666 671 # ifdef HAVE_GETOPT_LONG 667 672 printf(" zzuf -h | --help\n"); … … 693 698 printf(" -S, --signal prevent children from diverting crashing signals\n"); 694 699 printf(" -T, --max-time <n> kill children that run for more than <n> seconds\n"); 700 printf(" -x, --check-exit report processes that exit with a non-zero status\n"); 695 701 printf(" -h, --help display this help and exit\n"); 696 702 printf(" -v, --version output version information and exit\n"); … … 714 720 printf(" -S prevent children from diverting crashing signals\n"); 715 721 printf(" -T <n> kill children that run for more than <n> seconds\n"); 722 printf(" -x report processes that exit with a non-zero status\n"); 716 723 printf(" -h display this help and exit\n"); 717 724 printf(" -v output version information and exit\n");
Note: See TracChangeset
for help on using the changeset viewer.