On 08/26/2014 07:25 AM, Seyeong Kim wrote:
When try to connect to another host using virsh with password auth on
ssh env,
can't put password properly because it's waiting IO from STDIN.
This patch check if it's in pts so make that doesn't poll from STDIN.
---
tools/virsh-domain.c | 3 +++
tools/virsh.c | 11 +++++++++++
tools/virsh.h | 2 ++
3 files changed, 16 insertions(+)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 2562326..b079261 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -3698,6 +3698,9 @@ vshWatchJob(vshControl *ctl,
/* don't poll on STDIN if we are not using a terminal */
if (!vshTTYAvailable(ctl))
npollfd = 1;
+ /* don't poll on STDIN if we are using a pseudo terminal slave */
+ if (vshPTSAvailable(ctl))
+ npollfd = 1;
So we'd only poll stdin on non-pts ttys, should we bother polling on stdin at
all then?
What is the actual command that fails?
Also, there was a recent change in this area:
commit 7eabd5503e3de147b703c1a1e6dff81cdc46d1e7
cmdMigrate: move vshConnect before vshWatchJob
Does it fail with or without it too?
Jan