Parent process writes incorrect data to child process passwo


Parent process initialized master/slave pseudo-terminal, dupes
stdin/stdout/stderr to slave fd and runs child process which calls
getpass(“Enter password:”).
After reading “Enter password:” string parent process writes to
master fd “****\n” string.
Problem - getpass() readed only “\n”.

Any suggestions?

Thank you very much in advance,