<commit_before>#include "summa_child.h"
#include "drv_summa.h"

#include <stdio.h>
#include <unistd.h>

void summa_child_spawn(const char* path) {
  int pid = fork();
  
  if(
}<commit_msg>More progress<commit_after>#include "summa_child.h"
#include "drv_summa.h"

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

#if 1
#define DEBUG
#endif

void summa_child_spawn(const char* path) {
  int pid = fork();
  
  if(pid != 0)
    return;
  
  // Child!
#ifdef DEBUG
  printf("Child spawned: %s\n", path);
#endif
  
  struct drv_summa_device dev;
  
  if(drv_summa_open(path, &dev)) {
    fprintf(stderr, "drv_summa_open failed, %s\n", errstr);
    return;
  }
  
  drv_summa_set_mouse_mode(0, &dev);
  
  while(1) {
    struct timeval tv;
    
    drv_summa_poll(&tv, &dev);
    
    select(0, 0, 0, 0, &tv);
  }
  
  drv_summa_close(&dev);
}
{'fraction_non_alphanumeric': 0.15411764705882353, 'fraction_numerical': 0.009411764705882352, 'mean_word_length': 3.526595744680851, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '7012503', 'n_tokens_mistral': 378, 'n_tokens_neox': 366, 'n_words': 75}