<commit_before>// Copyright 2012 The Obvious Corporation.

/*
 * Daemon Sauce: Just sprinkle it on your Node program, to make it a proper
 * *nix daemon.
 *
 * This assumes that the original script gets called with at least one
 * option of the form --daemon=<mode>, where mode is one of "parent"
 * "child" or "foreground". When running normally, it should be
 * "parent." When running in the foreground (e.g.  during
 * development), it should be "foreground." The "child" mode is used
 * internally (for the spawned child process).
 */

/*
 * Modules used
 */

"use strict";

var child_process = require("child_process");
var fs            = require("fs");
var path          = require("path");
var posix         = require("posix");
var util          = require("util");

var daemonsauceNative = require("../bin/daemonsauceNative");


/*
 * Module-local variables
 */

/** the error log file */
var ERROR_LOG_NAME = "error.log";

/** the product name; used in logging */
var productName = "daemon";

/** what mode is this process in; one of: "child" "foreground" */
var mode = undefined;

/** directory for "run" files (notably, the pid lockfile) */
var runDir = undefined;
<commit_msg>Minor documentation correction.<commit_after>// Copyright 2012 The Obvious Corporation.

/*
 * Daemon Sauce: Just sprinkle it on your Node program, to make it a proper
 * *nix daemon.
 *
 * This assumes that the original script gets called with at least one
 * option of the form --daemon=<mode>, where mode is one of "parent"
 * "child" or "foreground". When running normally, it should be
 * "parent." When running in the foreground (e.g.  during
 * development), it should be "foreground." The "child" mode is used
 * internally (for the spawned child process).
 */

/*
 * Modules used
 */

"use strict";

var child_process = require("child_process");
var fs            = require("fs");
var path          = require("path");
var posix         = require("posix");
var util          = require("util");

var daemonsauceNative = require("../bin/daemonsauceNative");


/*
 * Module-local variables
 */

/** the error log file */
var ERROR_LOG_NAME = "error.log";

/** the product name; used in logging */
var productName = "daemon";

/** what mode is this process in; one of: "parent" "child" "foreground" */
var mode = undefined;

/** directory for "run" files (notably, the pid lockfile) */
var runDir = undefined;

{'fraction_non_alphanumeric': 0.12786339025406082, 'fraction_numerical': 0.003331945022907122, 'mean_word_length': 3.3752276867030964, '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': '857072', 'n_tokens_mistral': 711, 'n_tokens_neox': 690, 'n_words': 287}