Leave interactive mode on end of input
The interactive loop only ever broke on the literal string "quit". std::getline sets failbit at end of input and leaves the string empty, which the loop read as an ordinary blank command, so a piped script without a trailing quit -- or Ctrl+Z at a console -- spun forever printing prompts, and pawnio_close at the bottom of the function was never reached. Break when the stream fails, so end of input falls through to the existing close and the VM is torn down the same way quit tears it down. Measured by piping a single "ioctl_test 0" with no quit into both builds and killing anything still alive after two seconds: before still running, killed, 14004679 bytes of prompts on stdout after exited 0 after 57 bytes The documented sequence with an explicit quit still prints two "received 0 cells:" lines and exits 0.
N
namazso committed
74a570cf3c4d69619be4e95da523aca7c8da284c
Parent: 9eed56c