#include "process.h" #include "headers.h" int main(){ pthread_t tid; int fd = open("makefile", O_RDONLY); if(fd == -1) perror("Could not open makefile"); else if(pthread_create(&tid, NULL, process_fd, (void *)&fd) != 0) perror("Could not create thread"); else if(pthread_join(tid, NULL) != 0) perror("Could not join with thread"); else exit(EXIT_SUCCESS); exit(EXIT_FAILURE); }