serenity/Userland/ft.cpp
2018-11-09 10:19:33 +01:00

16 lines
310 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());
} else {
printf("parent, child pid=%d\n", pid);
}
return 0;
}