mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-05-01 20:42:01 +02:00
Add a mutex and fix the length in the net-test script
This commit is contained in:
parent
1b7bb246d1
commit
16edb843b7
5 changed files with 63 additions and 39 deletions
scripts
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue