- 论坛徽章:
- 0
|
参考下《进程维护工具--taskeeper第二版本》:
http://linux.chinaunix.net/bbs/viewthread.php?tid=1021030
int killProc(const struct proc_struct* proc)
{
int status = kill(proc->pid, SIGINT);
if(status != 0)
{
char msg[128] = {0};
printf(msg, "kill task %s fail\n", proc->name);
return -1;
}
return 1;
} |
|
|