add: Ns_CloseOnExec(in[0]); Ns_CloseOnExec(in[1]); Ns_CloseOnExec(out[0]); Ns_CloseOnExec(out[1]);
context: LocalProxy(NsExtConn * nsConn){    int  in[2], out[2];    char   *argv[3];    int     status, pid, code;    status = NS_ERROR;    /*     * Set CloseOnExec to avoid stuck-open connections.     */    Ns_CloseOnExec(in[0]);    Ns_CloseOnExec(in[1]);    Ns_CloseOnExec(out[0]);    Ns_CloseOnExec(out[1]);    if (ns_pipe(in) < 0) {        Ns_Log(Error, "nsext: failed to create input socket pipes");    } else {        if (ns_pipe(out) < 0) {	    close(in[0]);	    close(in[1]);            Ns_Log(Error, "nsext: failed to create output socket pipes");        } else {            argv[0] = nsConn->ctx->path;            argv[1] = NULL;            pid = Ns_ExecArgv(nsConn->ctx->path, NULL, out[0], in[1], argv,			      NULL);            close(out[0]);            close(in[1]);            if (pid == -1) {                Ns_Log(Error, "nsext: spawn failed for '%s'",		       nsConn->ctx->path);            } else {                if (Ns_WaitForProcess(pid, &code) == NS_OK) {                    if (code != 0) {                        Ns_Log(Error, "nsext: "			       "proxy returned non-zero exit code: %d", code);                    } else {                        nsConn->socks[0] = in[0];                        nsConn->socks[1] = out[1];                        status = NS_OK;                    }                }            }            if (status != NS_OK) {            	close(in[0]);            	close(out[1]);            }        }    }    return status;}