mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-10 17:12:55 +02:00
17 lines
310 B
C++
17 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;
|
|
}
|