Fix framebuffer and user events service disconnection bug.

FB and UE services overwrite the socket's read callbacks, making the console
unavare of the fact that console client gets disconnected. As the result,
console clients for FB and UE stays alive after UI has exited, making it
impossible to attach another UI. To fix this, we add socket read callbacks
to the FB and UE service that monitor the disconnection event and destroy
their console clients on such events.

Change-Id: I82e714f33ccc81bc04ca47eda6fbb8fab4a313f9
3 files changed
tree: 6b0c00f806dfb8432cb7468bc725f9698d6b617b
  1. android/
  2. audio/
  3. block/
  4. distrib/
  5. docs/
  6. elff/
  7. fpu/
  8. gdb-xml/
  9. hw/
  10. images/
  11. memcheck/
  12. pc-bios/
  13. proxy/
  14. slirp/
  15. slirp-android/
  16. target-arm/
  17. tcg/
  18. telephony/
  19. .gitignore
  20. a.out.h
  21. acl.c
  22. acl.h
  23. aes.c
  24. aes.h
  25. aio-android.c
  26. aio.c
  27. alpha.ld
  28. android-configure.sh
  29. android-rebuild.sh
  30. Android.mk
  31. arm-dis.c
  32. arm-semi.c
  33. arm.ld
  34. async.c
  35. balloon.h
  36. block.c
  37. block.h
  38. block_int.h
  39. blockdev.c
  40. blockdev.h
  41. bswap.h
  42. bt-host.c
  43. bt-host.h
  44. bt-vhci.c
  45. buffered_file.c
  46. buffered_file.h
  47. cache-utils.c
  48. cache-utils.h
  49. cbuffer.c
  50. cbuffer.h
  51. Changelog
  52. CHANGES.TXT
  53. charpipe.c
  54. charpipe.h
  55. CleanSpec.mk
  56. compatfd.c
  57. compatfd.h
  58. console-ui.c
  59. console.c
  60. console.h
  61. COPYING
  62. COPYING.LIB
  63. cpu-all.h
  64. cpu-common.h
  65. cpu-defs.h
  66. cpu-exec.c
  67. curses.c
  68. curses_keys.h
  69. cutils.c
  70. d3des.c
  71. d3des.h
  72. dcache.c
  73. dcache.h
  74. def-helper.h
  75. device_tree.c
  76. device_tree.h
  77. dis-asm.h
  78. disas.c
  79. disas.h
  80. dma-helpers.c
  81. dma.h
  82. dyngen-exec.h
  83. dynlink-static.c
  84. dynlink.h
  85. elf.h
  86. elf_ops.h
  87. envlist.c
  88. envlist.h
  89. exec-all.h
  90. exec.c
  91. feature_to_c.sh
  92. framebuffer.c
  93. framebuffer.h
  94. gdbstub.c
  95. gdbstub.h
  96. gen-charmap.py
  97. gen-icount.h
  98. gen-skin.py
  99. host-defs.h
  100. host-utils.c
  101. host-utils.h
  102. hostregs_helper.h
  103. hpet.h
  104. hxtool
  105. i386-dis.c
  106. i386-vl.ld
  107. i386.ld
  108. ia64.ld
  109. input.c
  110. INSTALL
  111. iolooper-select.c
  112. iolooper.h
  113. ioport-user.c
  114. ioport.c
  115. ioport.h
  116. json-lexer.c
  117. json-lexer.h
  118. json-parser.c
  119. json-parser.h
  120. json-streamer.c
  121. json-streamer.h
  122. keymaps.c
  123. keymaps.h
  124. kqemu.c
  125. kqemu.h
  126. kvm.h
  127. LICENSE
  128. linux_keycodes.h
  129. loader.c
  130. loadpng.c
  131. m68k.ld
  132. Makefile
  133. Makefile.android
  134. migration-dummy-android.c
  135. migration-exec.c
  136. migration-tcp-android.c
  137. migration-tcp.c
  138. migration.c
  139. migration.h
  140. module.c
  141. module.h
  142. MODULE_LICENSE_GPL
  143. monitor.c
  144. monitor.h
  145. net-android.c
  146. net-checksum.c
  147. net.c
  148. net.h
  149. NOTICE
  150. notify.c
  151. notify.h
  152. offset_layout.py
  153. osdep.c
  154. osdep.h
  155. outputchannel.c
  156. outputchannel.h
  157. path.c
  158. poison.h
  159. posix-aio-compat.c
  160. ppc-dis.c
  161. ppc.ld
  162. qbool.c
  163. qbool.h
  164. qdict.c
  165. qdict.h
  166. qemu-aio.h
  167. qemu-barrier.h
  168. qemu-char-android.c
  169. qemu-char.c
  170. qemu-char.h
  171. qemu-common.h
  172. qemu-config.c
  173. qemu-config.h
  174. qemu-error.c
  175. qemu-error.h
  176. qemu-io.c
  177. qemu-lock.h
  178. qemu-log.h
  179. qemu-malloc.c
  180. qemu-monitor.hx
  181. qemu-objects.h
  182. qemu-option.c
  183. qemu-option.h
  184. qemu-options.hx
  185. qemu-queue.h
  186. qemu-sockets-android.c
  187. qemu-sockets.c
  188. qemu-thread.c
  189. qemu-thread.h
  190. qemu-timer-ui.c
  191. qemu-timer.c
  192. qemu-timer.h
  193. qemu_debug.h
  194. qemu_file.h
  195. qemu_socket.h
  196. qemu_timers.h
  197. qerror.c
  198. qerror.h
  199. qfloat.c
  200. qfloat.h
  201. qint.c
  202. qint.h
  203. qjson.c
  204. qjson.h
  205. qlist.c
  206. qlist.h
  207. qobject.h
  208. qstring.c
  209. qstring.h
  210. readline.c
  211. readline.h
  212. README
  213. savevm.c
  214. sdl_keysym.h
  215. shaper.c
  216. shaper.h
  217. sockets.c
  218. sockets.h
  219. softmmu-semi.h
  220. softmmu_defs.h
  221. softmmu_exec.h
  222. softmmu_header.h
  223. softmmu_outside_jit.c
  224. softmmu_outside_jit.h
  225. softmmu_template.h
  226. sparc.ld
  227. sys-tree.h
  228. sysemu.h
  229. tap-win32.c
  230. targphys.h
  231. tcpdump.c
  232. tcpdump.h
  233. thunk.c
  234. thunk.h
  235. trace.c
  236. trace.h
  237. trace_common.h
  238. translate-all.c
  239. translate-op.c
  240. translate.make
  241. uboot_image.h
  242. usb-dummy-android.c
  243. usb-linux.c
  244. user-events-qemu.c
  245. user-events-ui.c
  246. user-events.h
  247. varint.c
  248. varint.h
  249. vgafont.h
  250. vl-android-ui.c
  251. vl-android.c
  252. vl.c
  253. vnc-android.c
  254. vnc-tls.h
  255. vnc.c
  256. vnc.h
  257. vnc_keysym.h
  258. vnchextile.h
  259. x86_64.ld