Add a mutex and fix the length in the net-test script

This commit is contained in:
blinry 2021-02-26 12:14:07 +01:00
parent 1b7bb246d1
commit 16edb843b7
5 changed files with 63 additions and 39 deletions
scripts

View file

@ -28,13 +28,19 @@ while(true) {
}
print("still connected");
my $s2;
$socket->recv($s2, ord($len));
$socket->recv($s2, $actual_len);
print($s2);
STDOUT->flush();
my $script;
open($script, ">", "/tmp/omgscript") or die $!;
#$s3 = 'export HOME=\'/home/blinry/.local/share/Oh My Git/tmp/\';export PATH=\'/home/blinry/.local/share/Oh My Git/tmp/:\'"$PATH";cd \'/home/blinry/.local/share/Oh My Git/tmp/repos/yours/\' || exit 1;find . -type f -not -path \'*/\\.git/*\'';
print $script $s2;
close($script);
$s = "";
$command = $s2 . "\necho MAGIC\n";
$command = ". /tmp/omgscript" . "\necho MAGIC\n";
print $in $command;
inner_while: while (true) {