<commit_before>import Process = require("./process");
import { CreepMemory } from "./memory/creep";
import { getProcessById } from "../kernel/kernel";
import OvermindProcess = require("./overmind");
abstract class CreepProcess extends Process {
    public memory: CreepMemory;
    abstract runCreep(creep: Creep): number;
    public run(): number {
        let creep = Game.creeps[this.memory.creepName];

        if (!creep) {
            console.log("A creep has disappeared:" + this.memory.creepName);
            let p = <OvermindProcess>getProcessById(this.parentPID);
            p.creepDies("", this.pid);
            return this.stop(0);
        } else {
            this.runCreep(creep);
            return 0;
        }
    }

}

export = CreepProcess;<commit_msg>For creep process, do not try to signal if the parent id is init process<commit_after>import Process = require("./process");
import { CreepMemory } from "./memory/creep";
import { getProcessById } from "../kernel/kernel";
import OvermindProcess = require("./overmind");
abstract class CreepProcess extends Process {
    public memory: CreepMemory;
    abstract runCreep(creep: Creep): number;
    public run(): number {
        let creep = Game.creeps[this.memory.creepName];

        if (!creep) {
            console.log("A creep has disappeared:" + this.memory.creepName);
            if (this.parentPID !== 0) {
                let p = <OvermindProcess>getProcessById(this.parentPID);
                p.creepDies("", this.pid);
            }
            return this.stop(0);
        } else {
            this.runCreep(creep);
            return 0;
        }
    }

}

export = CreepProcess;
{'fraction_non_alphanumeric': 0.125374925014997, 'fraction_numerical': 0.002999400119976005, 'mean_word_length': 2.4605809128630707, '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': '6324414', 'n_tokens_mistral': 487, 'n_tokens_neox': 471, 'n_words': 120}