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
There is currently a destroy method in the core::Program trait that closes stdin, waits for the process to finish and then closes stderr/stdout.
I am suggesting that either a new method be added to Program that forcibly kills the spawned process, or that the behaviour of destroy be changed to act in that way.
I think it would be better if the behaviour of destroy was changed because:
I think that forcible termination is an intuitive behaviour for the name destroy.
I don't think anybody is actually using the destroy method currently because, due to a bug in core::run, a segfault will occur due to a double fclose if you actually call it.
Are there any objections to this? If not I can send a pull request with code/tests.
The text was updated successfully, but these errors were encountered:
As proposed in issue #5632.
I added some new stuff to libc - hopefully correctly. I only added a single signal constant (SIGKILL) because adding more seems complicated by differences between platforms - and since it is not required for issue #5632 then I figure that I can use a further pull request to flesh out the SIG* constants more.
I would like to be able to forcibly terminate a spawned process, like you can in Python (http://docs.python.org/2/library/subprocess.html#subprocess.Popen.terminate) or Java (http://docs.oracle.com/javase/7/docs/api/java/lang/Process.html#destroy%28%29).
There is currently a
destroy
method in thecore::Program
trait that closes stdin, waits for the process to finish and then closes stderr/stdout.I am suggesting that either a new method be added to
Program
that forcibly kills the spawned process, or that the behaviour ofdestroy
be changed to act in that way.I think it would be better if the behaviour of
destroy
was changed because:destroy
.core::run
, a segfault will occur due to a double fclose if you actually call it.Are there any objections to this? If not I can send a pull request with code/tests.
The text was updated successfully, but these errors were encountered: