Skip to content

Commit

Permalink
fix: correctly ignore stdin in subprocesses
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelmauro committed Aug 29, 2024
1 parent f90064b commit 45fa3a0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions core/tests/recovery-test/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export async function executeCommandWithLogs(command: string, logsPath: string)
const logs = await fs.open(logsPath, 'w');
const childProcess = spawn(command, {
cwd: process.env.ZKSYNC_HOME!!,
stdio: [null, logs.fd, logs.fd],
stdio: ['ignore', logs.fd, logs.fd],
shell: true
});
try {
Expand Down Expand Up @@ -194,7 +194,7 @@ export class NodeProcess {

let childProcess = runExternalNodeInBackground({
components: [components],
stdio: [null, logs.fd, logs.fd],
stdio: ['ignore', logs.fd, logs.fd],
cwd: pathToHome,
env,
useZkInception,
Expand Down
4 changes: 2 additions & 2 deletions core/tests/revert-test/tests/revert-and-restart-en.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class MainNode {
}
let proc = runServerInBackground({
components: [components],
stdio: [null, logs, logs],
stdio: ['ignore', logs, logs],
cwd: pathToHome,
env: env,
useZkInception: fileConfig.loadFromFile,
Expand Down Expand Up @@ -281,7 +281,7 @@ class ExtNode {

// Run server in background.
let proc = runExternalNodeInBackground({
stdio: [null, logs, logs],
stdio: ['ignore', logs, logs],
cwd: pathToHome,
env: env,
useZkInception: fileConfig.loadFromFile,
Expand Down
6 changes: 3 additions & 3 deletions core/tests/revert-test/tests/revert-and-restart.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ describe('Block reverting test', function () {
// Run server in background.
serverProcess = runServerInBackground({
components: [components],
stdio: [null, logs, logs],
stdio: ['ignore', logs, logs],
cwd: pathToHome,
useZkInception: fileConfig.loadFromFile,
chain: fileConfig.chain
Expand Down Expand Up @@ -270,7 +270,7 @@ describe('Block reverting test', function () {
// Run server.
serverProcess = runServerInBackground({
components: [components],
stdio: [null, logs, logs],
stdio: ['ignore', logs, logs],
cwd: pathToHome,
useZkInception: fileConfig.loadFromFile,
chain: fileConfig.chain
Expand Down Expand Up @@ -321,7 +321,7 @@ describe('Block reverting test', function () {
// Run again.
serverProcess = runServerInBackground({
components: [components],
stdio: [null, logs, logs],
stdio: ['ignore', logs, logs],
cwd: pathToHome,
useZkInception: fileConfig.loadFromFile,
chain: fileConfig.chain
Expand Down
4 changes: 2 additions & 2 deletions core/tests/upgrade-test/tests/upgrade.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ describe('Upgrade test', function () {
// Run server in background.
runServerInBackground({
components: serverComponents,
stdio: [null, logs, logs],
stdio: ['ignore', logs, logs],
cwd: pathToHome,
useZkInception: fileConfig.loadFromFile,
chain: fileConfig.chain
Expand Down Expand Up @@ -346,7 +346,7 @@ describe('Upgrade test', function () {
// Run again.
runServerInBackground({
components: serverComponents,
stdio: [null, logs, logs],
stdio: ['ignore', logs, logs],
cwd: pathToHome,
useZkInception: fileConfig.loadFromFile,
chain: fileConfig.chain
Expand Down

0 comments on commit 45fa3a0

Please sign in to comment.