一些bin使用getopt来解析命令选项,比如renice。
int getopt(int argc, char * const argv[], const char *optstring);
root@m0032:/ # renice -t normal 10 6428 <br/>
root@m0032:/ # ps -p -P| grep com.spreadwin.popinfosc <br/>
u0_a49 6428 309 658016 21800 30 10 0 0 bg SyS_epoll_ b6cbb2e0 S com.spreadwin.popinfosc <br/>
root@m0032:/ # <br/>
root@m0032:/ # renice -t normal -10 6428 <br/>
renice: invalid option -- 1 <br/>
USAGE: renice [[-r] [-t TYPE] priority pids ...] [-g pid] <br/>
1|root@m0032:/ # <br/>发布于 2018-06-21 21:08:04
https://stackoverflow.com/questions/50967918
复制相似问题