You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Using the kill() method has no feedback. The childProcess.kill() method which python-shell uses internally returns a boolean describing the success of the operation, but it's not used. In fact it seems that python-shell assumes it was successfully killed as it sets terminated = true regardless of what happens.
Describe the solution you'd like
Return a boolean for success or failure of killing
The text was updated successfully, but these errors were encountered:
The kill() method() method already has a return value - it returns this allowing you to chain methods.
Although now that I think about it method chaining in this case is not really useful 🤔. If you kill the process you're probably done calling pythonshell methods.
So feel free to submit a PR changing this behavior if you wish and I'll review it.
Perhaps rather than setting this.terminated = true blindly, it could instead do this.terminated = this.childProcess.kill(sig), that way you could check the returned object if it successfully terminated and perhaps try again with a more aggressive kill signal.
Is your feature request related to a problem? Please describe.
Using the
kill()
method has no feedback. ThechildProcess.kill()
method which python-shell uses internally returns a boolean describing the success of the operation, but it's not used. In fact it seems that python-shell assumes it was successfully killed as it setsterminated = true
regardless of what happens.Describe the solution you'd like
Return a boolean for success or failure of killing
The text was updated successfully, but these errors were encountered: