#include <pthread.h>
#include <stdio.h>
void *f(void *foo) {
	if (pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL))
		perror("setcancelstate");
	return NULL;
}
int main(void) {
	pthread_t t;
	if (pthread_create(&t,NULL,f,NULL))
		perror("pthread_create");
	if (pthread_join(t,NULL))
		perror("pthread_join");
	return 0;
}
