in reply to Exec Fork Trick
You'd set up your child process (passwd) with the slave pty as the stdin, stdout, and stderr.
Another CPAN module that may help in conjunction with IO::Pty is IPC::Run which allows you to run processes with pty connections. From its manpage:
· Refusing to accept input unless stdin is a tty. Some programs, for security reasons, will only accept certain types of input from a tty. su, notable, will not prompt for a password unless it's connected to a tty. If this is your situation, use a pseudo terminal ('<pty<' and '>pty>').
|
|---|