{"action":"created","issue":{"url":"https://api.github.com/repos/natefinch/pie/issues/1","labels_url":"https://api.github.com/repos/natefinch/pie/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/natefinch/pie/issues/1/comments","events_url":"https://api.github.com/repos/natefinch/pie/issues/1/events","html_url":"https://github.com/natefinch/pie/issues/1","id":81445845,"number":1,"title":"Pie throws panic if iop.proc is nil","user":{"login":"lonelycode","id":2444409,"avatar_url":"https://avatars.githubusercontent.com/u/2444409?v=3","gravatar_id":"","url":"https://api.github.com/users/lonelycode","html_url":"https://github.com/lonelycode","followers_url":"https://api.github.com/users/lonelycode/followers","following_url":"https://api.github.com/users/lonelycode/following{/other_user}","gists_url":"https://api.github.com/users/lonelycode/gists{/gist_id}","starred_url":"https://api.github.com/users/lonelycode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lonelycode/subscriptions","organizations_url":"https://api.github.com/users/lonelycode/orgs","repos_url":"https://api.github.com/users/lonelycode/repos","events_url":"https://api.github.com/users/lonelycode/events{/privacy}","received_events_url":"https://api.github.com/users/lonelycode/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-05-27T13:26:42Z","updated_at":"2015-05-27T16:41:27Z","closed_at":"2015-05-27T14:10:09Z","body":"Not sure why this is, it could just be that the process is never assigned properly when it is created, this is using a python script as an external RPC plugin, everything works until it tries to close the process and then it explodes at this point: \r\n\r\n    if err := iop.proc.Signal(os.Interrupt); err != nil {\r\n\t\treturn err\r\n    }\r\n\r\nNot sure if this is just the way I am handling it (I'm trying to use an external, non-golang plugin writen in python, [gist is here](https://gist.github.com/lonelycode/14a6f2dc6798cd38b1a6)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/natefinch/pie/issues/comments/105988361","html_url":"https://github.com/natefinch/pie/issues/1#issuecomment-105988361","issue_url":"https://api.github.com/repos/natefinch/pie/issues/1","id":105988361,"user":{"login":"natefinch","id":3185864,"avatar_url":"https://avatars.githubusercontent.com/u/3185864?v=3","gravatar_id":"","url":"https://api.github.com/users/natefinch","html_url":"https://github.com/natefinch","followers_url":"https://api.github.com/users/natefinch/followers","following_url":"https://api.github.com/users/natefinch/following{/other_user}","gists_url":"https://api.github.com/users/natefinch/gists{/gist_id}","starred_url":"https://api.github.com/users/natefinch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natefinch/subscriptions","organizations_url":"https://api.github.com/users/natefinch/orgs","repos_url":"https://api.github.com/users/natefinch/repos","events_url":"https://api.github.com/users/natefinch/events{/privacy}","received_events_url":"https://api.github.com/users/natefinch/received_events","type":"User","site_admin":false},"created_at":"2015-05-27T16:41:27Z","updated_at":"2015-05-27T16:41:27Z","body":"You can test it out by adding a long wait in your plugin's function, and using rpc.Client.Go() to make a few requests in parallel.    \r\n\r\nThe code for the master process would look something like this:\r\n\r\n```go\r\npackage main\r\n\r\nimport (\r\n\t\"log\"\r\n\t\"net/rpc/jsonrpc\"\r\n\r\n\t\"github.com/natefinch/pie\"\r\n)\r\n\r\nfunc main() {\r\n\tpath := \"plugin.py\"\r\n\tclient, err := pie.StartProviderCodec(jsonrpc.NewClientCodec, os.Stderr, path)\r\n\tif err != nil {\r\n\t\tlog.Fatalf(\"Error running plugin: %s\", err)\r\n\t}\r\n\tdefer client.Close()\r\n\r\n\tvar reply1 string\r\n\tcall1 := client.Go(\"Plugin.SayHi\", \"one\", &reply1, nil)\r\n\r\n\tvar reply2 string\r\n\tcall2 := client.Go(\"Plugin.SayHi\", \"two\", &reply2, nil)\r\n\r\n\tvar reply3 string\r\n\tcall3 := client.Go(\"Plugin.SayHi\", \"three\", &reply3, nil)\r\n\r\n\tcount := 0\r\n\tfor count < 3 {\r\n\t\tselect {\r\n\t\tcase <-call1.Done:\r\n\t\t\tlog.Printf(\"#1 is done, reply: %s\", reply1)\r\n\t\t\tcount++\r\n\t\tcase <-call2.Done:\r\n\t\t\tlog.Printf(\"#2 is done, reply: %s\", reply2)\r\n\t\t\tcount++\r\n\t\tcase <-call3.Done:\r\n\t\t\tlog.Printf(\"#3 is done, reply: %s\", reply3)\r\n\t\t\tcount++\r\n\t\t}\r\n\t}\r\n}\r\n```"}}