%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
'use strict'; const common = require('../common'); if (common.isWindows) common.skip('test not supported on Windows'); const assert = require('assert'); if (process.argv[2] === 'child') { const fs = require('fs'); assert.strictEqual(process.listenerCount('SIGUSR2'), 1); process.kill(process.pid, 'SIGUSR2'); process.kill(process.pid, 'SIGUSR2'); // Asynchronously wait for the snapshot. Use an async loop to be a bit more // robust in case platform or machine differences throw off the timing. (function validate() { const files = fs.readdirSync(process.cwd()); if (files.length === 0) return setImmediate(validate); assert.strictEqual(files.length, 2); for (let i = 0; i < files.length; i++) { assert.match(files[i], /^Heap\..+\.heapsnapshot$/); JSON.parse(fs.readFileSync(files[i])); } })(); } else { const { spawnSync } = require('child_process'); const tmpdir = require('../common/tmpdir'); tmpdir.refresh(); const args = ['--heapsnapshot-signal', 'SIGUSR2', __filename, 'child']; const child = spawnSync(process.execPath, args, { cwd: tmpdir.path }); assert.strictEqual(child.status, 0); assert.strictEqual(child.signal, null); }