Skip to content

Conversation

wll8
Copy link

@wll8 wll8 commented Jun 17, 2022

See: coderaiser/cloudcmd#190

this.on('kill', (code) => {
    // Can only end the first process
    // child.kill(code);

    // Can end subprocess, but at the expense of `code`
    import('fkill').then(fkill => fkill.default(child.pid, {
        force: true,
    })).catch(err => {
        console.log(`Process has been terminated, or other errors.`)
    });
});

@coderaiser
Copy link
Owner

Would be great to have test for this using 📼Supertape

@wll8
Copy link
Author

wll8 commented Jun 17, 2022

You add this test harness in this repository and then I add test cases?

@coderaiser
Copy link
Owner

You can install it and use just like in restafary and other packages

@coderaiser
Copy link
Owner

I'm preparing Cloud Commander to ESM, so we can use regular import instead of dynamic coderaiser/cloudcmd@9f4a23e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants