How_Linux_Works/Chapter2/2.4_ppidloop.c
2025-02-01 12:29:41 +08:00

13 lines
172 B
C

// cc -o ppidloop 2.4_ppidloop.c
// ./ppidloop &
// sar -P ALL 1
// kill [PID]
#include <sys/types.h>
#include <unistd.h>
int main()
{
for (;;)
getppid();
}