<commit_before>from .base_executor import ScriptExecutor


class Executor(ScriptExecutor):
    ext = '.R'
    name = 'R'
    nproc = -1  # needs a bunch
    command = 'Rscript'
    test_program = 'writeLines(readLines(file("stdin")))'
    syscalls = ['mkdir', 'setup', 'fork', 'waitpid', 'getpgrp', 'execve']

    fs = ['stdin', '.*\.(?:rdb|rdx|rds|R)', '/lib/', '/etc/ld\.so\.(?:cache|preload|nohwcap)$',
          '/usr/local/lib/', '/etc/passwd$', '/etc/nsswitch.conf$', '/etc/group$']

    def get_cmdline(self):
        return [self.get_command(), '--vanilla', self._code]<commit_msg>Allow wait4 to R<commit_after>from .base_executor import ScriptExecutor


class Executor(ScriptExecutor):
    ext = '.R'
    name = 'R'
    nproc = -1  # needs a bunch
    command = 'Rscript'
    test_program = 'writeLines(readLines(file("stdin")))'
    syscalls = ['mkdir', 'setup', 'fork', 'waitpid', 'wait4', 'getpgrp', 'execve']

    fs = ['stdin', '.*\.(?:rdb|rdx|rds|R)', '/lib/', '/etc/ld\.so\.(?:cache|preload|nohwcap)$',
          '/usr/local/lib/', '/etc/passwd$', '/etc/nsswitch.conf$', '/etc/group$']

    def get_cmdline(self):
        return [self.get_command(), '--vanilla', self._code]
{'fraction_non_alphanumeric': 0.22436974789915967, 'fraction_numerical': 0.0033613445378151263, 'mean_word_length': 3.4275092936802976, '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': '2598127', 'n_tokens_mistral': 456, 'n_tokens_neox': 445, 'n_words': 85}