[1/6] testbot/TestAgent: 'nc -q0' seems to be the default but make it explicit just in case. (resend)

Francois Gouget fgouget at codeweavers.com
Mon Feb 25 10:32:11 CST 2013


I'm resending this patch because it belongs to a 6-parts series, not a 
12-parts one. In fact the patches are mostly conceptually independent 
but some touch the same area so they may need to be applied in the right 

Also this 6-part series could probably be changed to three 2-parts 
series but that would be pretty confusing.

When the client disconnects it shuts down the ssh connection which leads 
to netcat's stdin. When that happens netcat gets an EOF and we then want 
it to exit right away rather than hang around and potentially prevent 
us from reconnecting to the testagentd server.

libvirt also uses the '-q0' option (however I believe it's mostly on 
Windows that -q0 is not the default so we should not run into this 
issue: the host we run netcat on is Unix).

 testbot/lib/WineTestBot/TestAgent.pm |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testbot/lib/WineTestBot/TestAgent.pm b/testbot/lib/WineTestBot/TestAgent.pm
index f06bd71..1f52818 100644
--- a/testbot/lib/WineTestBot/TestAgent.pm
+++ b/testbot/lib/WineTestBot/TestAgent.pm
@@ -851,7 +851,7 @@ sub _Connect($)
     # Use netcat to forward the connection from the SSH server to the TestAgent
     # server. Note that we won't know about netcat errors at this point.
-    if (!$self->{fd}->exec("nc '$self->{agenthost}' '$self->{agentport}'"))
+    if (!$self->{fd}->exec("nc -q0 '$self->{agenthost}' '$self->{agentport}'"))
       $self->_SetError($FATAL, "Unable to start netcat: " . $self->_ssherror());
       return undef;

More information about the wine-patches mailing list