if (rv == -1) return -1;
static int init_cgi_env(struct request *r){	char *p, *b;	int rv;	p = r->path_translated;	b = strrchr(p, '/');	if (b == 0)		return -1;	*b = 0;	rv = chdir(p);	if (debug)		log_d("init_cgi_env: chdir(\"%s\") = %d", p, rv);	*b = '/';	if (rv == -1)		return -1;	if (make_cgi_envp(r) == -1)		return -1;	if (make_cgi_argv(r, p) == -1)		return -1;	return 0;}