Skip to content

Instantly share code, notes, and snippets.

@Onixaz
Onixaz / process_termination.js
Last active February 26, 2026 12:44
Process test
//parent.js
const { spawn } = require("child_process");
console.log("Parent process started.");
// 1. Spawn the child process.
// We use 'node' to execute the 'child.js' script.
const childApp = spawn("node", ["child.js"], {
stdio: "inherit", // Share the parent's console to see logs from the child.
});
import path from 'path';
import fs from 'fs';
import { certificatesFromSerialPath } from '../../../constants';
import { hexToAscii } from '../../../utility';
import { checkComPort, exportSerialport, exportStore } from '../../../serialInterface';
import { log } from '../../../logger';
import tags from '../../../../terminalTags';
import {
autoTestsActions,