#include #include /* * cc -pthread -o direct_exec_test direct_exec_test.c * ./direct_exec_test * /libexec/ld-elf.so.1 ./direct_exec_test */ void* dowork(void*); int main(int argc, char* argv[]) { printf("Hello from main thread.\n"); pthread_t dynthread; printf("Going to thread.\n"); pthread_create(&dynthread, NULL, &dowork, NULL); pthread_join(dynthread, NULL); printf("Back to main.\n"); return(0); } void * dowork(void* foo) { printf("Hello from dowork().\n"); return NULL; }