#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
int main(){
pid_t pid=fork();
if (pid<0){
perror("fork failed");
return 1;
}
printf("Process ID: %d, Parent ID: %d\n", getpid(), getppid());
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDx1bmlzdGQuaD4KI2luY2x1ZGUgPHN5cy90eXBlcy5oPgoKaW50IG1haW4oKXsKcGlkX3QgcGlkPWZvcmsoKTsKaWYgKHBpZDwwKXsKcGVycm9yKCJmb3JrIGZhaWxlZCIpOwpyZXR1cm4gMTsKfQoKcHJpbnRmKCJQcm9jZXNzIElEOiAlZCwgUGFyZW50IElEOiAlZFxuIiwgZ2V0cGlkKCksIGdldHBwaWQoKSk7CnJldHVybiAwOwp9Cg==