Fix netserver start invocation not to block when invoked from ssh

From: Benjamin Poirier <poirier@google.com>
Signed-off-by: Martin J. Bligh <mbligh@google.com>

Netserver is the server component of netperf. When netserver is started from
the command line, it is supposed to background itself and the command returns
right after. However, when attempting to do this via ssh, netserver doesn't
behave the same way: it starts but doesn't detach properly and ssh sits there
waiting for it to terminate.

Roman Kagan <rkagan@sw.ru>
I didn't look at the netserver itself, but the behavior you describe
usually indicates that it daemonizes without closing std{in,out,err},
and ssh doesn't exit until they are closed. 



git-svn-id: http://test.kernel.org/svn/autotest/trunk@621 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/tests/netperf2/netperf2.py b/client/tests/netperf2/netperf2.py
index ea4c8c7..a0ae608 100755
--- a/client/tests/netperf2/netperf2.py
+++ b/client/tests/netperf2/netperf2.py
@@ -15,10 +15,15 @@
 
 
 	def initialize(self):
-		self.server_path = os.path.join(self.srcdir, 'src/netserver')
+		# netserver doesn't detach properly from the console. When 
+		# it is run from ssh, this causes the ssh command not to 
+		# return even though netserver meant to be backgrounded.
+		# This behavior is remedied by redirecting fd 0, 1 & 2
+		self.server_path = ('%s &>/dev/null </dev/null' 
+			% os.path.join(self.srcdir, 'src/netserver'))
 		self.client_path = os.path.join(self.srcdir, 'src/netperf')
 
-		
+
 	def execute(self, server_ip, client_ip, role, 
 					script='snapshot_script', args=''):
 		server_tag = server_ip + '#netperf-server'