17 lines
288 B
C
17 lines
288 B
C
|
#include <stdio.h>
|
||
|
#include <sys/types.h>
|
||
|
#include <unistd.h>
|
||
|
|
||
|
int main(int argc, char const *argv[])
|
||
|
{
|
||
|
printf("正在运行程序,进程号: %d\n", getpid());
|
||
|
while (1)
|
||
|
;
|
||
|
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
ps -ef | grep a.out 查询进程号
|
||
|
kill -9 进程号 杀死进程
|
||
|
*/
|