{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/vscode-go/issues/1379","repository_url":"https://api.github.com/repos/Microsoft/vscode-go","labels_url":"https://api.github.com/repos/Microsoft/vscode-go/issues/1379/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vscode-go/issues/1379/comments","events_url":"https://api.github.com/repos/Microsoft/vscode-go/issues/1379/events","html_url":"https://github.com/Microsoft/vscode-go/pull/1379","id":277547242,"number":1379,"title":"Update terminateProcess.sh to delete debug binary.","user":{"login":"NexWeb","id":3054475,"avatar_url":"https://avatars0.githubusercontent.com/u/3054475?v=4","gravatar_id":"","url":"https://api.github.com/users/NexWeb","html_url":"https://github.com/NexWeb","followers_url":"https://api.github.com/users/NexWeb/followers","following_url":"https://api.github.com/users/NexWeb/following{/other_user}","gists_url":"https://api.github.com/users/NexWeb/gists{/gist_id}","starred_url":"https://api.github.com/users/NexWeb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NexWeb/subscriptions","organizations_url":"https://api.github.com/users/NexWeb/orgs","repos_url":"https://api.github.com/users/NexWeb/repos","events_url":"https://api.github.com/users/NexWeb/events{/privacy}","received_events_url":"https://api.github.com/users/NexWeb/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-11-28T21:39:10Z","updated_at":"2017-12-07T09:49:00Z","closed_at":"2017-12-06T06:39:32Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/Microsoft/vscode-go/pulls/1379","html_url":"https://github.com/Microsoft/vscode-go/pull/1379","diff_url":"https://github.com/Microsoft/vscode-go/pull/1379.diff","patch_url":"https://github.com/Microsoft/vscode-go/pull/1379.patch"},"body":"RE: #1345 As simple as this fix is, it is working for me. On OS X, normally the debug binary does not get deleted, ever. With this modification, the binary debug file gets deleted as long as there are no pending breakpoints or you have continued past them. Which is appropriate, because if there are existing breakpoints and debug information, Delve can can continue to use the binary until your done."},"comment":{"url":"https://api.github.com/repos/Microsoft/vscode-go/issues/comments/349916777","html_url":"https://github.com/Microsoft/vscode-go/pull/1379#issuecomment-349916777","issue_url":"https://api.github.com/repos/Microsoft/vscode-go/issues/1379","id":349916777,"user":{"login":"NexWeb","id":3054475,"avatar_url":"https://avatars0.githubusercontent.com/u/3054475?v=4","gravatar_id":"","url":"https://api.github.com/users/NexWeb","html_url":"https://github.com/NexWeb","followers_url":"https://api.github.com/users/NexWeb/followers","following_url":"https://api.github.com/users/NexWeb/following{/other_user}","gists_url":"https://api.github.com/users/NexWeb/gists{/gist_id}","starred_url":"https://api.github.com/users/NexWeb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NexWeb/subscriptions","organizations_url":"https://api.github.com/users/NexWeb/orgs","repos_url":"https://api.github.com/users/NexWeb/repos","events_url":"https://api.github.com/users/NexWeb/events{/privacy}","received_events_url":"https://api.github.com/users/NexWeb/received_events","type":"User","site_admin":false},"created_at":"2017-12-07T09:49:00Z","updated_at":"2017-12-07T09:49:00Z","author_association":"CONTRIBUTOR","body":"With the current script, the `kill -9 $1 > /dev/null 2>&1 `, being outside the for loop and recursively calling terminateTree, is causing a segmentation fault and obviously not getting the job done.\r\n\r\nConsider the following, which works:\r\n```\r\n#!/bin/bash\r\npids=(521 522 523 524 525)\r\nterminateTree() {\r\nfor p in \"${pids[@]}\"  \r\ndo  \r\n    echo \"PID is $p\"\r\ndone  \r\n}\r\nterminateTree \r\n```\r\nIf you place the echo statement after the done and call terminateTree \r\n within the loop, the same as it is in terminateProcess.sh, it will fail with a Segmentation fault: 11.\r\n"}}
{"actor":{"display_login":"NexWeb"}}