Revert "Fix adb hang when subprocess dies early."

This is for http://b/3482112 "adb interactions with device causing test harness failures".

This reverts commit 5066a9b05b90c6440df235427afa07522023121d.

Change-Id: I630bf2e04d2ecf0223bd2af4e87136754ff880d3
diff --git a/sockets.c b/sockets.c
index 699ce27..43925e4 100644
--- a/sockets.c
+++ b/sockets.c
@@ -243,7 +243,6 @@
     s->closing = 1;
     fdevent_del(&s->fde, FDE_READ);
     remove_socket(s);
-    D("LS(%d): put on socket_closing_list fd=%d\n", s->id, s->fd);
     insert_local_socket(s, &local_socket_closing_list);
 }
 
@@ -251,8 +250,6 @@
 {
     asocket *s = _s;
 
-    D("LS(%d): event_func(fd=%d, ev=%04x)\n", s->id, s->fd, ev);
-
     /* put the FDE_WRITE processing before the FDE_READ
     ** in order to simplify the code.
     */
@@ -311,7 +308,6 @@
 
         while(avail > 0) {
             r = adb_read(fd, x, avail);
-            D("LS(%d): post adb_read(fd=%d,...) r=%d (errno=%d) avail=%d\n", s->id, s->fd, r, r<0?errno:0, avail);
             if(r > 0) {
                 avail -= r;
                 x += r;
@@ -326,7 +322,6 @@
             is_eof = 1;
             break;
         }
-        D("LS(%d): fd=%d post avail loop. r=%d is_eof=%d\n", s->id, s->fd, r, is_eof);
 
         if((avail == MAX_PAYLOAD) || (s->peer == 0)) {
             put_apacket(p);
@@ -367,8 +362,6 @@
             ** bytes of readable data.
             */
 //        s->close(s);
-        D("LS(%d): FDE_ERROR (fd=%d)\n", s->id, s->fd);
-
         return;
     }
 }
@@ -377,11 +370,11 @@
 {
     asocket *s = calloc(1, sizeof(asocket));
     if (s == NULL) fatal("cannot allocate socket");
+    install_local_socket(s);
     s->fd = fd;
     s->enqueue = local_socket_enqueue;
     s->ready = local_socket_ready;
     s->close = local_socket_close;
-    install_local_socket(s);
 
     fdevent_install(&s->fde, fd, local_socket_event_func, s);
 /*    fdevent_add(&s->fde, FDE_ERROR); */
@@ -407,7 +400,7 @@
     if(fd < 0) return 0;
 
     s = create_local_socket(fd);
-    D("LS(%d): bound to '%s' via %d\n", s->id, name, fd);
+    D("LS(%d): bound to '%s'\n", s->id, name);
     return s;
 }