On Sun, Jul 6, 2014 at 6:12 AM, Stephan Beal <sgb...@googlemail.com> wrote:
> Looking at the code (getpass() in user.c)... i'm not sure. It uses > getc(stdin) to reach char by char, but doesn't seem to do anything unusual > with the stream. Ah... that's the Windows/Android impl. On unix it uses > getpass(3) (unistd.h), which might do something weird to prohibit piping in > input. > As I recall, getpass(3) opens its own file descriptor to the controlling "terminal", configures it with some reasonable, non-echo settings, then reads the user's password. Expect gets around this by using a pseudo terminal. the child side of the fork assigns the "slave" side of the pseudo terminal to STDIN, STDOUT and STDERR, then execs the command (or the shell to run the command). Then expect monitors and controls the command via the control side of the pseudo terminal. FYI, xterm (and other Unix/Linux/etc command line windows) work the same way.
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users