摘要:
int getpriority(int which, int who);返回一组进程的优先级 参数which和who确定返回哪一组进程的优先级 The value which is one of PRIO_PROCESS, PRIO_PGRP, or PRIO_USER, and who is in 阅读全文
摘要:
当子进程先于父进程退出时,如果父进程没有调用wait和waitpid函数,子进程就会进入僵死状态。 pid_t wait(int *status); pid_t waitpid(pid_t pid, int *status, int options); The wait() system call 阅读全文
摘要:
用ioctl控制,通过SIOCGIFHWADDR获取MAC地址,SIOCSIFHWADDR设置MAC地址,不过在设置MAC地址之前,要先把网卡down掉,设置好了以后,再UP起来。 #include <sys/types.h> /* for socket(2) and related bits an 阅读全文