Don't occasionally hang for 10s on shell startup.
Don't occasionally hang for 10s on shell startup.

We use freopen in native shell initialization to redirect shell stdout
to a fifo, so that it can be read by the android_mojo_shell tooling. The
call to freopen blocks until the fifo is open to be read from the other
side.

It seems that the call to "shell am start -W" is occasionally slow to
return, delaying the moment when we open the fifo for reading and thus
blocking the shell initialization. This is causing the shell start to
sometimes hang for 10s doing nothing in particular.

Removing the "-W: Wait for launch to complete." seems to help with that.

Credits for spotting the fix to qsr@.

Fixes #87.

R=qsr@chromium.org

Review URL: https://codereview.chromium.org/1082933002

jianglu/mojo,collinjackson/mojo,afandria/mojo,afandria/mojo,jianglu/mojo,chinmaygarde/mojo,afandria/mojo,collinjackson/mojo,chinmaygarde/mojo,afandria/mojo,afandria/mojo,jianglu/mojo,jianglu/mojo,jianglu/mojo,collinjackson/mojo,chinmaygarde/mojo,jianglu/mojo,chinmaygarde/mojo,chinmaygarde/mojo,collinjackson/mojo,jianglu/mojo,collinjackson/mojo,afandria/mojo,chinmaygarde/mojo,collinjackson/mojo,collinjackson/mojo,chinmaygarde/mojo,chinmaygarde/mojo,collinjackson/mojo,chinmaygarde/mojo,afandria/mojo,collinjackson/mojo,afandria/mojo,jianglu/mojo