Debug stub tests: Handle EOF on socket gracefully rather than by spinning
Debug stub tests: Handle EOF on socket gracefully rather than by spinning

This fix means that if sel_ldr crashes during the test, the test will
terminate with an error rather than consuming CPU indefinitely.

BUG=none
TEST=tested with buggy debug stub changes that caused a crash

Review URL: https://chromiumcodereview.appspot.com/10825237

git-svn-id: 721b910a23eff8a86f00c8fd261a7587cddf18f8@9408 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

nacl-webkit/native_client,nacl-webkit/native_client,sbc100/native_client,sbc100/native_client,nacl-webkit/native_client,sbc100/native_client,nacl-webkit/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client,nacl-webkit/native_client