veyron/runtimes/google/rt: fix flakiness in TestSimpleServerDoubleSignal

The function returned by remoteCmdLoop(stdin) should be called with defer
instead of go: we need to avoid exiting the child program before the cmd loop
has exited.  Otherwise, two bad things may happen:

(1) the loop may still be left spinning even when stdin has been closed (and
hence the read in the loop will fail).

(2) there's nothing preventing the child program from exiting upon receiving a
single signal.  E.g. the child in TestSimpleServerDoubleSignal may exit upon
receiving the first signal, before the second signal arrives. This is probably
the cause behind http://go/vissues/421.

Change-Id: Ibc1110dd08e28fdd09443b473630c2384471720d
diff --git a/runtimes/google/rt/shutdown_servers_test.go b/runtimes/google/rt/shutdown_servers_test.go
index 3e3f730..35966a2 100644
--- a/runtimes/google/rt/shutdown_servers_test.go
+++ b/runtimes/google/rt/shutdown_servers_test.go
@@ -76,7 +76,7 @@
 	// commands from the parent process to simulate Stop and
 	// RemoteStop commands that would normally be issued from
 	// application code.
-	go remoteCmdLoop(stdin)()
+	defer remoteCmdLoop(stdin)()
 
 	// r.Cleanup is optional, but it's a good idea to clean up, especially
 	// since it takes care of flushing the logs before exiting.
@@ -219,7 +219,7 @@
 	// commands from the parent process to simulate Stop and
 	// RemoteStop commands that would normally be issued from
 	// application code.
-	go remoteCmdLoop(stdin)()
+	defer remoteCmdLoop(stdin)()
 
 	// r.Cleanup is optional, but it's a good idea to clean up, especially
 	// since it takes care of flushing the logs before exiting.