<commit_before>#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
#include <util.h>


pid_t popen2 (int *tty, char *cmd[]) {
  int master_fd;
  char *slave_dev = NULL;
  pid_t pid;
  
  if ((master_fd = posix_openpt(O_RDWR | O_NOCTTY)) < 0 ||
      grantpt(master_fd) != 0 ||
      unlockpt(master_fd) != 0 ||
      (slave_dev = ptsname(master_fd)) == NULL) return -1;

  int slave_fd = open(slave_dev, O_RDWR | O_NOCTTY);

  if (slave_fd == -1) return -1;

  pid = fork();
  if (pid < 0) return pid;

  if (pid == 0) {
    // child
    close(master_fd);
<commit_msg>Add termios.h<commit_after>#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
#include <termios.h>

pid_t popen2 (int *tty, char *cmd[]) {
  int master_fd;
  char *slave_dev = NULL;
  pid_t pid;
  
  if ((master_fd = posix_openpt(O_RDWR | O_NOCTTY)) < 0 ||
      grantpt(master_fd) != 0 ||
      unlockpt(master_fd) != 0 ||
      (slave_dev = ptsname(master_fd)) == NULL) return -1;

  int slave_fd = open(slave_dev, O_RDWR | O_NOCTTY);

  if (slave_fd == -1) return -1;

  pid = fork();
  if (pid < 0) return pid;

  if (pid == 0) {
    // child
    close(master_fd);

{'fraction_non_alphanumeric': 0.16829268292682928, 'fraction_numerical': 0.014634146341463415, 'mean_word_length': 3.2157534246575343, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 15, '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': '3556522', 'n_tokens_mistral': 541, 'n_tokens_neox': 515, 'n_words': 123}