ladybird/Userland/ft2.cpp
2018-11-09 10:19:33 +01:00

18 lines
346 B
C++

#include <stdio.h>
#include <unistd.h>
int main(int argc, char** argv)
{
(void) argc;
(void) argv;
printf("Testing fork()...\n");
pid_t pid = fork();
if (!pid) {
printf("child, pid=%d\n", getpid());
for (;;);
} else {
printf("parent, child pid=%d\n", pid);
for (;;);
}
return 0;
}