3
0
mirror of https://github.com/pragma-/pbot.git synced 2026-02-28 04:07:55 +01:00

Misc minor pbot-vm updates

This commit is contained in:
Pragmatic Software 2026-02-02 12:59:32 -08:00
parent 07b1d570bc
commit 520912da20
No known key found for this signature in database
GPG Key ID: CC916B6E3C84ECCE
5 changed files with 6 additions and 6 deletions

View File

@ -52,7 +52,7 @@ sub load_modules() {
sub vsock_server() {
print "Starting VSOCK server on PID $$\n";
system("socat VSOCK-LISTEN:".VPORT.",reuseaddr,fork EXEC:accept-vsock-client");
system("socat VSOCK-LISTEN:".VPORT.",reuseaddr,fork,max-children=0 EXEC:accept-vsock-client");
print "VSOCK server shutdown.\n";
exit; # exit child process

View File

@ -39,7 +39,7 @@ sub info($text, $maxlen = 255) {
my ($sec, $usec) = gettimeofday;
my $time = strftime "%a %b %e %Y %H:%M:%S", localtime $sec;
$time .= sprintf ".%03d", $usec / 1000;
print STDERR "$$ $time :: $text";
print STDERR "[$$] $time :: $text";
}
sub read_input($input, $buffer, $tag) {
@ -78,7 +78,7 @@ sub read_input($input, $buffer, $tag) {
my $command = eval { decode_json($line) };
if ($@) {
info("Failed to decode JSON: $@\n", 1024);
info("Failed to decode JSON: $@\n");
return {
arguments => '',
cmdline => 'sh prog.sh',

View File

@ -34,7 +34,7 @@ sub info($text, $maxlen = 255) {
my ($sec, $usec) = gettimeofday;
my $time = strftime "%a %b %e %Y %H:%M:%S", localtime $sec;
$time .= sprintf ".%03d", $usec / 1000;
print STDERR "$$ $time :: $text";
print STDERR "[$$] $time :: $text";
}
sub new {

View File

@ -14,7 +14,7 @@ sub initialize {
$self->{sourcefile} = 'prog.c';
$self->{execfile} = 'prog';
$self->{default_options} = '-Wextra -Wall -Wno-unused-parameter -Wno-unused-variable -pedantic -Wfloat-equal -Wshadow -std=c2x -lm -Wfatal-errors -fsanitize=integer,alignment,undefined -fsanitize-address-use-after-scope -fno-omit-frame-pointer';
$self->{default_options} = '-Wextra -Wall -Wno-unused-parameter -Wno-unused-variable -pedantic -Wfloat-equal -Wshadow -std=c2x -lm -Wfatal-errors -fsanitize=integer,alignment,undefined -fno-omit-frame-pointer';
$self->{options_paste} = '-fcaret-diagnostics';
$self->{options_nopaste} = '-fno-caret-diagnostics';
$self->{cmdline} = 'clang -gdwarf-2 -g3 $sourcefile $options -o $execfile';

View File

@ -25,7 +25,7 @@ use PBot::Imports;
# These are set by the /misc/update_version script
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 4932,
BUILD_REVISION => 4933,
BUILD_DATE => "2026-02-02",
};