Skip to content

Instantly share code, notes, and snippets.

@zanchey
Created November 30, 2016 07:14
Show Gist options
  • Save zanchey/efeccad05357a54821cf9572a2ea5779 to your computer and use it in GitHub Desktop.
Save zanchey/efeccad05357a54821cf9572a2ea5779 to your computer and use it in GitHub Desktop.
/* confdefs.h */
#include <errno.h>
#include <pthread.h>
#include <signal.h>
void *thread1_func(void *p_arg)
{
errno = 1;
}
int
main ()
{
errno = 0;
pthread_t t1;
pthread_create(&t1, NULL, thread1_func, NULL);
pthread_join(t1, NULL);
return errno;
;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment