Created
September 10, 2013 00:12
-
-
Save danish-rehman/6503288 to your computer and use it in GitHub Desktop.
Doubt regarding the pthread_exit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main(int argc, char *argv[]) | |
{ | |
int i=1; | |
void *output; | |
pthread_t thread; | |
int status = pthread_create(&thread, | |
NULL, | |
server, | |
(void*)i); | |
pthread_exit(0); | |
return(0); | |
} | |
void* server(void *param) | |
{ | |
printf("Print Server\n"); | |
printf("------%d\n", (int)param); | |
return (void*)100; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment