static uint64_t extract_caps(ProcessHandle process) {
	FILE *fp = process_fopen(process, "status");

	char buf[MAXBUF];
	while (fgets(buf, MAXBUF, fp)) {
		if (strncmp(buf, "CapBnd:\t", 8) == 0) {
			unsigned long long val;
			if (sscanf(buf + 8, "%llx", &val) == 1) {
				fclose(fp);
				return val;
			}
			break;
		}
	}

	fprintf(stderr, "Error: cannot read caps configuration\n");
	exit(1);
}
static uint64_t extract_caps(ProcessHandle process) {
	FILE *fp = process_fopen(process, "status");

	char buf[MAXBUF];
	while (fgets(buf, MAXBUF, fp)) {
		if (strncmp(buf, "CapBnd:\t", 8) == 0) {
			unsigned long long val;
			if (sscanf(buf + 8, "%llx", &val) == 1) {
				fclose(fp);
				return val;
			}
			break;
		}
	}

	fprintf(stderr, "Error: cannot read caps configuration\n");
	exit(1);
}