electron/spec/fixtures/api/utility-process/no-js-after-exit.js
Niklas Wenzel 3ea4c6c3e7
fix: utilityProcess running user script after process.exit is called (#47492)
fix: utilityProcess running user script after process.exit is called (#47469)

* fix: utilityProcess running user script after process.exit is called

* docs: update breaking changes

* chore: update spec

* chore: update spec/api-utility-process-spec.ts



* chore: remove interface bound checks

---------

Co-authored-by: Robo <hop2deep@gmail.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-06-17 21:01:50 -05:00

7 lines
196 B
JavaScript

const { writeFileSync } = require('node:fs');
const arg = process.argv[2];
const file = arg.split('=')[1];
writeFileSync(file, 'before exit');
process.exit(1);
writeFileSync(file, 'after exit');