Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! cluster: support windowsHide option for workers
  • Loading branch information
toddwong committed Dec 3, 2017
commit e8d752ee121584b2d4d622fefcee82b823a55c8f
3 changes: 2 additions & 1 deletion test/parallel/test-cluster-fork-windowsHide.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,12 @@ if (!process.argv[2]) {
process.send({ type: 'workerOnline' });

let output = '0';
if (process.platform === 'win32')
if (process.platform === 'win32') {
output = child_process.execSync(
'powershell -NoProfile -c ' +
`"(Get-Process -Id ${worker.process.pid}).MainWindowHandle"`,
{ windowsHide: true, encoding: 'utf8' });
}

process.send({ type: 'mainWindowHandle', value: output });
worker.send('shutdown');
Expand Down