mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
16 lines
310 B
C++
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;
|
|
}
|