Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Terminate a long-running script #1

Closed
stkb opened this issue Mar 17, 2016 · 8 comments
Closed

Terminate a long-running script #1

stkb opened this issue Mar 17, 2016 · 8 comments

Comments

@stkb
Copy link
Contributor

stkb commented Mar 17, 2016

Hi, thanks for the plugin!

The one thing I miss at the moment (unless I missed it), is the ability to terminate a long-running script (eg a watch script). Like vscode's own "Terminate Running Task" command.

@fknop
Copy link
Owner

fknop commented Mar 17, 2016

Hi @stkb,

I'm glad you like it. I'll see what I can do about that this week-end !

Thanks for the suggestion.

@fknop
Copy link
Owner

fknop commented Mar 19, 2016

Hi,

I published 3.0.0. You can try it and tell me if you find a bug. I only tested it on Windows. I don't have Unix right now.

I used the npm module tree-kill.

Windows doesn't have feedback yet. But it should work.

@stkb
Copy link
Contributor Author

stkb commented Mar 22, 2016

Thanks 👍 It works great! (I'm only on Windows too)

You said it doesn't have feedback yet; not sure if this is what you meant but it would be great if you could just add a line to the npm output pane to say the script's been terminated.

@fknop
Copy link
Owner

fknop commented Mar 22, 2016

Yes, that is what I meant, I'll do that soon. Should take 5 minutes :)

@stkb
Copy link
Contributor Author

stkb commented Mar 22, 2016

Great! will close this now

@stkb stkb closed this as completed Mar 22, 2016
@fknop
Copy link
Owner

fknop commented Mar 22, 2016

I added a little feedback when we try to terminate a process.
But for now, on Windows, I don't know how to make the difference between a killed process and a code 1 exit. The signal is null because SIGTERM doesn't exist on windows.

@stkb
Copy link
Contributor Author

stkb commented Mar 22, 2016

No, there seems to be no way to tell on Windows.

What I would have done maybe is add an extra flag, like wasKilled, to ChildCommand.
Then set this flag in the terminate function, and then check for its presence in the onExit event of the child process.

@fknop
Copy link
Owner

fknop commented Mar 22, 2016

Yeah I thought about it too. I guess I'll do that then ! :)

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

No branches or pull requests

2 participants