Lines Matching refs:argv
60 static int parse_obsolete_options(int argc, char **argv);
98 main(int argc, char *argv[])
122 * If argv[1] is in the valid range of priority values then
126 if (isdigit(argv[1][0])) {
127 if (strtol(argv[1], (char **)NULL, 10) > (PRIO_MAX+1)) {
129 argv++;
132 exit(parse_obsolete_options(argc, argv));
134 } else if ((argv[1][0] == '-' || argv[1][0] == '+') &&
135 isdigit(argv[1][1])) { /* renice priority ... */
137 exit(parse_obsolete_options(argc, argv));
141 while ((c = getopt(argc, argv, "n:gpui:")) != -1) {
171 argv += optind;
177 for (; argc > 0; argc--, argv++) {
179 if (isdigit(argv[0][0])) {
180 who = strtol(*argv, &end_ptr, 10);
183 if (who >= 0 && end_ptr != *argv &&
188 *argv);
195 if ((pwd = getpwnam(*argv)) != NULL) {
198 *argv);
202 *argv);
207 if ((grp = getgrnam(*argv)) != NULL) {
210 *argv);
214 *argv);
219 if ((who = getprojidbyname(*argv)) != (id_t)-1) {
221 *argv);
225 *argv);
230 if (zone_get_id(*argv, &who) != 0) {
233 *argv);
237 errs += donice(which, who, incr, prio_type, *argv);
244 gettext("renice: bad value: %s\n"), *argv);
253 parse_obsolete_options(int argc, char *argv[])
262 argv++;
268 prio = strtol(*argv, &end_ptr, 10);
279 argv++;
281 for (; argc > 0; argc--, argv++) {
282 if (strcmp(*argv, "-g") == 0) {
286 if (strcmp(*argv, "-u") == 0) {
290 if (strcmp(*argv, "-p") == 0) {
294 if (which == PRIO_USER && !isdigit(argv[0][0])) {
295 struct passwd *pwd = getpwnam(*argv);
300 *argv);
306 who = strtol(*argv, &end_ptr, 10);
309 gettext("renice: bad value: %s\n"), *argv);
314 errs += donice(which, who, prio, RENICE_PRIO_ABSOLUTE, *argv);