Process
Neutralino's OS API (execCommand method): https://neutralino.js.org/docs/api/os#osexeccommandcommand-options
Static class
Process.run(command, options)
import { Process } from '@empathize/framework';
// Executes 'rm -rf "my_folder"'
Process.run('rm -rf "my_folder"');
// Executes 'cd "my_folder" && SOME_ENV_VARIABLE="example value" rm -rf "my_folder"'
Process.run('rm -rf "my_file.txt"', {
cwd: 'my_folder',
env: {
SOME_ENV_VARIABLE: 'example value'
}
});Process.kill(id, forced)
import { Process } from '@empathize/framework';
// SIGTERM (-15)
Process.kill(1293);
// SIGKILL (-9)
Process.kill(1293, true);Object
process.finish(callback)
Specify callback that will be called when the process will be closed
process.output(callback)
Specify callback that will be called when the process will write some output
process.kill(forced)
process.running()
Last updated