summaryrefslogtreecommitdiff
path: root/pluginCheck.go
diff options
context:
space:
mode:
Diffstat (limited to 'pluginCheck.go')
-rw-r--r--pluginCheck.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/pluginCheck.go b/pluginCheck.go
index 6dc072d..f1514a3 100644
--- a/pluginCheck.go
+++ b/pluginCheck.go
@@ -60,6 +60,7 @@ func checkPluginCompatibility(pluginPath string) error {
return nil
}
+/*
// tests the plugin file will load
func testPluginOld() {
_, err := plugin.Open(argGui.GuiPluginHack)
@@ -70,17 +71,20 @@ func testPluginOld() {
log.Log(PLUG, "plugin.Open() SUCCESS loading plugin =", argGui.GuiPluginHack)
os.Exit(0)
}
+*/
func CheckPlugin() string {
if argGui.GuiPluginHack != "" {
// does os.Exec() and does not return
- testPluginAndExit()
+ TestPluginAndExit()
}
return "boo"
}
// loads the plugin, then exits with 0 or -1
-func testPluginAndExit() {
+// this is a workaround for GO plugins not cleaning up correctly after
+// an attempt to load them
+func TestPluginAndExit() {
log.Log(WARN, "TEST plugin START", argGui.GuiPluginHack)
absPath, err := filepath.Abs(argGui.GuiPluginHack)