handler_lock = (pthread_mutex_t*)calloc(1, sizeof(pthread_mutex_t));
pthread_mutex_init(handler_lock, 0);
old_err_handler = XSetErrorHandler(x_error_handler);
handler_lock = (pthread_mutex_t*)calloc(1, sizeof(pthread_mutex_t));
pthread_mutex_init(handler_lock, 0);
old_err_handler = XSetErrorHandler(x_error_handler);