<commit_before>/**
 * Copyright (c) 2012 <NAME>
 * MIT License
 */

(function () {
  "use strict";

  var helpers = require('../helpers.js');
  var Process = helpers.core('process');


  // this will spawn a pump process, this way:
  // 1. execute a process (called pump.js)
  // 2. require a monitor module
  // 3. execute another process
  // 4. pump output from process to monitor
  exports.spawnPump = function(options, deatached) {
    var child = new Process({
      file: helpers.executable('pump.js'),
      deatached: deatached,
      options: options
    });

    return child;
  };

  // this will spawn a daemon process, this way:
  // 1. spawn a process (called daemon.js)
  // 2a. daemon.js will start another process (pump.js) using core.spawnPump
  // 2b. daemon.js will store stderr output from pump.js
  // 3a. the pump.js will send PID info to daemon.js
  // 3b. daemon.js will send PID info to pump.js
  // when pump dies:
  // 1. daemon.js will spawn a new pump.js
  // when daemon dies:
  // 1. pump.js will spawn a new daemon.js
  // 2. pump.js will kill itself
  exports.spawnDaemon = function (options, deatached, args) {
    var child = new Process({
      file: helpers.executable('daemon.js'),
      deatached: deatached,
      args: args,
      options: options
    });

    return child;
  };

})();<commit_msg>[fix] do an actually unattach<commit_after>/**
 * Copyright (c) 2012 <NAME>
 * MIT License
 */

(function () {
  "use strict";

  var helpers = require('../helpers.js');
  var Process = helpers.core('process');


  // this will spawn a pump process, this way:
  // 1. execute a process (called pump.js)
  // 2. require a monitor module
  // 3. execute another process
  // 4. pump output from process to monitor
  exports.spawnPump = function(options, unattach) {
    var child = new Process({
      file: helpers.executable('pump.js'),
      unattach: unattach,
      options: options
    });

    return child;
  };

  // this will spawn a daemon process, this way:
  // 1. spawn a process (called daemon.js)
  // 2a. daemon.js will start another process (pump.js) using core.spawnPump
  // 2b. daemon.js will store stderr output from pump.js
  // 3a. the pump.js will send PID info to daemon.js
  // 3b. daemon.js will send PID info to pump.js
  // when pump dies:
  // 1. daemon.js will spawn a new pump.js
  // when daemon dies:
  // 1. pump.js will spawn a new daemon.js
  // 2. pump.js will kill itself
  exports.spawnDaemon = function (options, unattach, args) {
    var child = new Process({
      file: helpers.executable('daemon.js'),
      unattach: unattach,
      args: args,
      options: options
    });

    return child;
  };

})();
{'fraction_non_alphanumeric': 0.12704309063893016, 'fraction_numerical': 0.01188707280832095, 'mean_word_length': 2.501950585175553, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '757808', 'n_tokens_mistral': 916, 'n_tokens_neox': 872, 'n_words': 310}