home *** CD-ROM | disk | FTP | other *** search
- 1 /*
- 2 * n.c ----- Runs a Unix process at a desired "nice" value.
- 3 */
- 4
- 5 #include <stdio.h>
- 6
- 7 main(argc,argv)
- 8 char **argv;
- 9 {
- 10 int nicevalue; /* Desired nice value */
- 11 /*
- 12 * A real program should perform decent error handling. This one
- 13 * does not.
- 14 */
- 15 nicevalue = atoi(argv[1]); /* Get nice value from cmd line */
- 16
- 17 nice(nicevalue); /* Set nice value */
- 18 execvp(argv[2], &argv[2]); /* Run desired pgm using nice value*/
- 19 }
-