• Swann Perarnau's avatar
    [feature] Properly handle run events in order · 957deb8d
    Swann Perarnau authored
    This patch implements a small finite state machine on the cmd side to be
    able to run a command, wait for all of its output, and then exit.
    
    As the daemon can send those message in any order, we need to wait them
    properly, in particular the closing of stdout/stderr before exiting.
    
    This patch also fixes the read_until_close callback creation to ensure
    that the stream EOF is handled as a distinct message.
    957deb8d
daemon.py 11.3 KB