mirror of
https://github.com/QingdaoU/Judger.git
synced 2025-01-04 11:21:42 +00:00
17 lines
258 B
C
17 lines
258 B
C
#include <unistd.h>
|
|
#include <stdio.h>
|
|
|
|
int main()
|
|
{
|
|
pid_t pid = fork();
|
|
if (pid > 0) {
|
|
printf("i'm parent");
|
|
}
|
|
else if (pid == 0) {
|
|
printf("i'm children");
|
|
}
|
|
else {
|
|
printf("fork failed");
|
|
}
|
|
return 0;
|
|
} |