version 1.57, 2006/06/19 22:31:20 |
version 1.58, 2007/04/07 23:20:19 |
|
|
int arg, ch, what; |
int arg, ch, what; |
char *memf, *nlistf; |
char *memf, *nlistf; |
char buf[_POSIX2_LINE_MAX]; |
char buf[_POSIX2_LINE_MAX]; |
|
const char *errstr; |
int cnt; |
int cnt; |
gid_t gid; |
gid_t gid; |
|
|
|
|
case 'p': |
case 'p': |
if (pflg++) |
if (pflg++) |
usage(); |
usage(); |
if (!isdigit(*optarg)) { |
arg = strtonum(optarg, 0, INT_MAX, &errstr); |
warnx( "-p requires a process id"); |
if (errstr != NULL) { |
|
warnx("-p requires a process id, %s: %s", |
|
errstr, optarg); |
usage(); |
usage(); |
} |
} |
what = KERN_PROC_PID; |
what = KERN_PROC_PID; |
arg = atoi(optarg); |
|
break; |
break; |
case 's': |
case 's': |
sflg = 1; |
sflg = 1; |