mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
84000835e2
This patch groups the preparation of main thread execution into `prepareMainThreadExecution()` and removes the cluster IPC setup in worker thread bootstrap since clusters do not use worker threads for its implementation and it's unlikely to change. PR-URL: https://github.com/nodejs/node/pull/26000 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
21 lines
407 B
JavaScript
21 lines
407 B
JavaScript
'use strict';
|
|
|
|
// Stdin is not a TTY, we will read it and execute it.
|
|
|
|
const {
|
|
prepareMainThreadExecution
|
|
} = require('internal/bootstrap/pre_execution');
|
|
|
|
const {
|
|
evalScript,
|
|
readStdin
|
|
} = require('internal/process/execution');
|
|
|
|
prepareMainThreadExecution();
|
|
markBootstrapComplete();
|
|
|
|
readStdin((code) => {
|
|
process._eval = code;
|
|
evalScript('[stdin]', process._eval, process._breakFirstLine);
|
|
});
|