home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GEMini Atari
/
GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso
/
zip
/
mint
/
mntutl95.lzh
/
MNTUTL95
/
NICE.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-03
|
539b
|
43 lines
#include <stdio.h>
#include <process.h>
#include <osbind.h>
#include "mintbind.h"
void
usage()
{
fprintf(stderr, "Usage: nice [-#] program [args ... ]\n");
exit(-1);
}
int
main(argc, argv)
int argc;
char **argv;
{
long r;
int delta = 10;
char *name;
if (!argv[1]) {
usage();
}
argv++;
name = *argv;
if (*name == '-') {
delta = atoi(name+1);
name = *++argv;
}
Pnice(delta);
r = spawnvp(P_OVERLAY, name, argv);
if (r < 0) {
perror(argv[1]);
exit(-1);
}
exit(r);
}