test,tracing: use close event to wait for stdio
Use 'close'
rather than 'exit'
to make sure that all stdio
has been captured by the time that the event handler is run.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines