If the output from a code snippet is `0` without a newline,
Perl treats this as a false value. When Guest::process_command()
returns a false value, that signals to guest-server::serial_server()
that it is the parent returning and so it will not send the result back
to the host.
However, `0\n` is a true value. Solution: always append a final newline to
the guest output.
The vm-exec command now recognizes the following options:
-vm-serial -vm-heart -vm-cid -vm-vport -vm
The -vm option accepts a name and configures the serial,
heart, cid and vport appropriately.
The vm-exec command can be configured by /host/config/vm-exec.json.
This initial refactor commit starts with Languages/_default.pm. It moves
several things to their own packages: Paste, InteractiveEdit, SplitLine.
All of these packages will soon be further refactored or rewritten.
VM socket communication is superior to VM serial communication in
every way. Unfortunately at this time only Linux supports them.
Fortunately, that's 99% of PBot's userbase.
If you're not using Linux or if you're using an older Linux that
does not support VM sockets, the PBot VM scripts will gracefully
fallback to using the serial connection. You may explicitly
disable VM socket connection attempts by setting PBOTVM_CID=0.
* VM scripts can now be configured via environment variables:
PBOTVM_DOMAIN, PBOTVM_TIMEOUT, PBOTVM_SERVER, PBOTVM_SERIAL,
PBOTVM_HEART, PBOTVM_NOREVERT
Some recent changes in the default `gdb` debugging format has broken
some gdb functionality, notably the `info macro` command.
Specifying the `dwarf-2` format restores this functionality.
This is expected to take three commits to complete. This first initial
commit does the following:
- Begin initial rough-draft of doc/VirtualMachine.md
- Begin initial refactoring of scripts
The next commit will polish up the initial rough-draft and refactoring.
The final commit will quality-check everything and fix anything overlooked.
"Applet" is a much better name for the external command-line
scripts and programs that can be loaded as PBot commands. They
will no longer be confused with Perl modules.
https://en.wikipedia.org/wiki/Applet