add random stuffs
This commit is contained in:
14
make_zombie_process.c
Normal file
14
make_zombie_process.c
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main() {
|
||||
pid_t pid = fork();
|
||||
if (pid < 0) {
|
||||
perror("fork failed");
|
||||
return 1;
|
||||
}
|
||||
if (pid != 0) {
|
||||
sleep(30);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user