mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:38:10 +00:00

It's just a simple struct { ref_count, paddr }. This will allow me to implement lazy zeroing and COW pages.
16 lines
312 B
C++
16 lines
312 B
C++
#include <stdio.h>
|
|
#include <unistd.h>
|
|
|
|
int main(int argc, char** 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;
|
|
}
|