On Thu, Jan 02, 2020 at 04:37:17PM +0100, Benjamin Baier wrote:
> "case CMD_SEND:" sets done=1 so ret will never be written to and
> the uninitialized value of ret is used to determine the return
> value of the function vmmaction.
Good catch:

        $ doas vmctl start -b ~/vm/bsd.rd -m 128M test ; echo $?
        vmctl: starting without disks
        vmctl: starting without network interfaces
        vmctl: started vm 4 successfully, tty /dev/ttyp2
        0
        $ doas vmctl send test >/dev/null ; echo $?
        vmctl: sent vm test successfully
        1

With your diff it exits zero.

I also just noticed that above example reproducibly causes vmd(8) to
exit:

Jan  2 18:53:57 eru vmd[55128]: startup
Jan  2 18:54:18 eru vmd[55128]: test: started vm 4 successfully, tty /dev/ttyp2
Jan  2 18:54:28 eru vmd[49983]: priv exiting, pid 49983
Jan  2 18:54:28 eru vmd[29885]: control exiting, pid 29885


OK kn if anyone wants to commit, otherwise I'll do so tomorrow when
looking into this issue.

Reply via email to