example of using stdin and stdout as a message buffer: selfdrive/manager/build.py