How to dynamically connect and disconnect stdin in child_process?

49 views Asked by At

I'm attempting to spawn a Quake server through node's child_process. According to the child_process, using the 'ignore' string for the stdin index should ignore the input, yet it's still locking my input to the launched console application.

const path = require('path');

const cp = require('child_process');
const myPath = path.join(__dirname, '..', 'quake1', 'fteqwsv64.exe');
//Launch the Quake1 server, direct the output to node's process output. Don't take input.
let quake = cp.spawn(myPath, {
    stdio: ['ignore', 'inherit', 'inherit']
});

This doesn't seem to work. It locks my input to the console to the launched application.

How can I properly control stdio's input?

0

There are 0 answers