S
sam
Hi,
I try to use popen execute scp, when the user finish password, it will
return to the cin input prompt, but the problem is popen does not wait
for user finish typing up the password before displaying the cin input
prompt. As a result, the scp password input prompt does not receive any
input from user.
Here is few lines from the code:
popen("/usr/bin/scp /tmp/test [email protected]:~/", "w");
string commandline;
cout << endl << "User Prompt>>";
getline(cin, commandline, '\n');
Do I need to change popen to something else? or need to write my own
popen function to deal with the process waiting?
Thanks
Sam
I try to use popen execute scp, when the user finish password, it will
return to the cin input prompt, but the problem is popen does not wait
for user finish typing up the password before displaying the cin input
prompt. As a result, the scp password input prompt does not receive any
input from user.
Here is few lines from the code:
popen("/usr/bin/scp /tmp/test [email protected]:~/", "w");
string commandline;
cout << endl << "User Prompt>>";
getline(cin, commandline, '\n');
Do I need to change popen to something else? or need to write my own
popen function to deal with the process waiting?
Thanks
Sam