mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-30 13:19:47 +00:00
It's just a simple struct { ref_count, paddr }.
This will allow me to implement lazy zeroing and COW pages.
17 lines
312 B
C++
17 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;
|
|
}
|