processes vs. threads void *f(void *_) { sleep(1); printf("this is f\n"); exit(0); } int main(){ pthread_t tid; pthread_create(&tid, NULL, f, NULL); pthread_join(tid, NULL); // line X printf("this is main\n"); }