1: /* nice */
   2: 
   3: #include <stdio.h>
   4: 
   5: main(argc, argv)
   6: int argc;
   7: char *argv[];
   8: {
   9:     int nicarg = 10;
  10:     extern errno;
  11:     extern char *sys_errlist[];
  12: 
  13:     if(argc > 1 && argv[1][0] == '-') {
  14:         nicarg = atoi(&argv[1][1]);
  15:         argc--;
  16:         argv++;
  17:     }
  18:     if(argc < 2) {
  19:         fputs("usage: nice [ -n ] command\n", stderr);
  20:         exit(1);
  21:     }
  22:     nice(nicarg);
  23:     execvp(argv[1], &argv[1]);
  24:     fprintf(stderr, "%s: %s\n", sys_errlist[errno], argv[1]);
  25:     exit(1);
  26: }

Defined functions

main defined in line 5; never used
Last modified: 1981-07-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 666
Valid CSS Valid XHTML 1.0 Strict