hashicorp / go-plugin

Golang plugin system over RPC.
Mozilla Public License 2.0
5.25k stars 450 forks source link

Close plugin #131

Closed pjebs closed 4 years ago

pjebs commented 4 years ago

The builtin plugin package doesn't support closing a plugin to release its resources and make the application behave as if the plugin was never loaded in the first place: https://github.com/golang/go/issues/20461

Does the approach used in this package allow a "Close()" that releases all resources etc.

ncabatoff commented 4 years ago

Since the plugins are implemented as subprocesses, yes, it's easy to release all resources when you're done with a plugin. See for example Client.Kill.