1'use strict'; 2const common = require('../common'); 3const { spawnSync } = require('child_process'); 4const { strictEqual } = require('assert'); 5 6// FIXME add sunos support 7if (common.isSunOS) 8 common.skip(`Unsupported platform [${process.platform}]`); 9// FIXME add IBMi support 10if (common.isIBMi) 11 common.skip('Unsupported platform IBMi'); 12 13// Explicitly assigning to process.title before starting the child process 14// is necessary otherwise *its* process.title is whatever the last 15// SetConsoleTitle() call in our process tree set it to. 16// Can be removed when https://github.com/libuv/libuv/issues/2667 is fixed. 17if (common.isWindows) 18 process.title = process.execPath; 19 20const xs = 'x'.repeat(1024); 21const proc = spawnSync(process.execPath, ['-p', 'process.title', xs]); 22strictEqual(proc.stdout.toString().trim(), process.execPath); 23