int main() {
int err, ret;
size_t stack_size;
int new_size = 20480;
pthread_attr_t thread_attr;
pthread_attr_init(&thread_attr);
ret = pthread_attr_getstacksize(&thread_attr, &stack_size);
printf ("return is %d\n", ret);
printf ("orgininal stack size if %d\n", stack_size);
ret = pthread_attr_setstacksize(&thread_attr, new_size);
ret = pthread_attr_getstacksize(&thread_attr, &stack_size);
printf ("return is %d\n", ret);
printf ("new stack size if %d\n", stack_size);