[Stefan Sperling]
> svnrdump should not be using stdin for input.
> It should accept the file on the command line instead because
> using stdin interferes with prompting.

Hrrrmph.  I think libsvn_subr/prompt.c could use a large dose of
"/dev/tty".  Right now it mostly uses stderr and stdin, but for
password prompts it uses /dev/tty on modern Unix ... indirectly,
by calling apr_password_get() which calls getpass(), an OS library
function.

"/dev/tty" is mentioned in APUE from 1992, so I expect it is pretty
universal in Unix-land, but one could also use ctermid() if available.
On Win32, I understand the console is named "CON:".  Are there any
other platforms we support where /dev/tty, CON: and ctermid() would all
fail?  Unfortunately, apr doesn't provide any of this stuff.

I'd also like to assume --non-interactive if our process has no
controlling terminal.  On Unix you can tell by trying to open /dev/tty.
On Windows, maybe similar?  Anyway, auto-detection of --non-interactive
would be nice but is really kinda a separate discussion.
-- 
Peter Samuelson | org-tld!p12n!peter | http://p12n.org/

Reply via email to