Skip to content

Instantly share code, notes, and snippets.

@bibiboot
Created September 10, 2013 00:12
Show Gist options
  • Save bibiboot/6503288 to your computer and use it in GitHub Desktop.
Save bibiboot/6503288 to your computer and use it in GitHub Desktop.
Doubt regarding the pthread_exit
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