#include #include #include #include int main(int argc, char **argv) { int status; pid_t p; printf("parent: pthread_self: %p\n", pthread_self()); fflush(stdout); p = vfork(); if (p == 0) { printf("child: pthread_self: %p\n", pthread_self()); fflush(stdout); return 0; } wait(&status); return 0; }