<commit_before>module Vagrant
  module Serial
    module Middleware
      class Forward
        def initialize(app, env)
          @app = app
        end

        def call(env)
          `socat tcp-l:30001,reuseaddr,fork UNIX-CONNECT:$HOME/serial/#{env[:machine].id}-com1 &`
          `socat tcp-l:30002,reuseaddr,fork UNIX-CONNECT:$HOME/serial/#{env[:machine].id}-com2 &`
          @app.call(env)
        end
      end
    end
  end
end<commit_msg>Fixed the execution of commands inside virtual machine<commit_after>module Vagrant
  module Serial
    module Middleware
      class Forward
        def initialize(app, env)
          @app = app
        end

        def call(env)
          env[:vm].channel.execute("socat tcp-l:30001,reuseaddr,fork UNIX-CONNECT:$HOME/serial/#{env[:vm].id}-com1 &")
          env[:vm].channel.execute("socat tcp-l:30002,reuseaddr,fork UNIX-CONNECT:$HOME/serial/#{env[:vm].id}-com2 &")
          @app.call(env)
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.12436289500509684, 'fraction_numerical': 0.024464831804281346, 'mean_word_length': 2.363013698630137, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6258076', 'n_tokens_mistral': 340, 'n_tokens_neox': 323, 'n_words': 62}