Mark the reader thread as "daemon", which means that when the main script
exits, the thread will be just killed instead of blocking the entire script.
This change makes bmaptool exit immediately on Ctrl-C. Without this change,
bmaptool is blocked for some times because the reader thread is blocked,
because it is reading data via a very slow link. It is fine to just kill it in
this case, instead of waiting.
Change-Id: I66628dc19bff6ef75e45394432b7dacdca3e2b6a
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
args = (self._f_objs[-1], child_process.stdin, )
self._rthread = threading.Thread(target=self._read_thread, args=args)
+ self._rthread.daemon = True
self._rthread.start()
self._force_fake_seek = True