Frank Li schrieb: > + memset(&pass, 0, sizeof(pass)); > + pass.argv = args; > + pass.out = -1; > + pass.use_shell = 1; I thought that the conclusion was to follow how openssh treats SSH_ASKPASS, and it *does not* treat it as a command with arguments. Do not set use_shell. > + if (start_command(&pass)) { > + error("could not run %s\n", askpass); As I said, this error message is redundant. No big deal, though. > + exit(1); > + } > + > + strbuf_read(&buffer, pass.out, 20); > + close(pass.out); > + finish_command(&pass); You must check for errors here as well. No error message is needed, either. > + > + for (i = 0; i < buffer.len; i++) > + if (buffer.buf[i] == '\n' || buffer.buf[i] == '\r') { > + buffer.buf[i] = '\0'; > + buffer.len = i; > + } I think you can shorten this loop to strbuf_setlen(&buffer, strcspn(buffer.buf, "\r\n")); -- Hannes -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html