for(i=1; i<=ntiles_x; i++) { shm_delete(&tile_row_shm[i]); if (single_copytile && i >= single_copytile) { break; } }
X_UNLOCK;   clean_shm(1);
static void interrupted (int sig) {	int i;	exit_sig = sig;	if (exit_flag) {		exit_flag++;		if (use_threads) {			usleep2(250 * 1000);		} else if (exit_flag <= 2) {			return;		}		exit(4);	}	exit_flag++;	if (sig == 0) {		fprintf(stderr, "caught X11 error:\n");	} else {		fprintf(stderr, "caught signal: %d\n", sig);	}	if (sig == SIGINT) {		shut_down = 1;		return;	}	/*	 * to avoid deadlock, etc, just delete the shm areas and	 * leave the X stuff hanging.	 */	shm_delete(&scanline_shm);	shm_delete(&fullscreen_shm);	/* 	 * Here we have to clean up quite a few shm areas for all	 * the possible tile row runs (40 for 1280), not as robust	 * as one might like... sometimes need to run ipcrm(1). 	 */	for(i=1; i<=ntiles_x; i++) {		shm_delete(&tile_row_shm[i]);		if (single_copytile && i >= single_copytile) {			break;		}	}	/* X keyboard cleanups */	delete_added_keycodes();	if (clear_mods == 1) {		clear_modifiers(0);	} else if (clear_mods == 2) {		clear_keys();	}	if (no_autorepeat) {		autorepeat(1);	}	if (sig) {		exit(2);	}}