{"action":"created","comment":{"url":"https://api.github.com/repos/theia-ide/theia/pulls/comments/236025630","pull_request_review_id":178032731,"id":236025630,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNjAyNTYzMA==","diff_hunk":"@@ -94,33 +94,21 @@ export class TaskService implements TaskConfigurationClient {\n \n         // notify user that task has finished\n         this.taskWatcher.onTaskExit((event: TaskExitedEvent) => {\n-            const signal = event.signal;\n             if (!this.isEventForThisClient(event.ctx)) {\n                 return;\n             }\n \n-            if (event.code === 0) {  // normal process exit\n-                let success = '';\n-\n-                // this finer breakdown will not work on Windows.\n-                if (signal && signal !== '0') {\n-                    if (signal === '1') {\n-                        success = 'Terminal Hangup received - ';\n-                    } else if (signal === '2') {\n-                        success = 'User Interrupt received - ';\n-                    } else if (signal === '15' || signal === 'SIGTERM') {\n-                        success = 'Termination Interrupt received - ';\n-                    } else {\n-                        success = 'Interrupt received - ';\n-                    }\n+            if (event.code !== undefined) {\n+                const message = `Task ${event.taskId} has exited with code ${event.code}.`;\n+                if (event.code === 0) {\n+                    this.messageService.info(message);","path":"packages/task/src/browser/task-service.ts","position":26,"original_position":26,"commit_id":"2f782b137e406a4909abe4beb7904a83c1352639","original_commit_id":"2f782b137e406a4909abe4beb7904a83c1352639","user":{"login":"marechal-p","id":14182238,"node_id":"MDQ6VXNlcjE0MTgyMjM4","avatar_url":"https://avatars0.githubusercontent.com/u/14182238?v=4","gravatar_id":"","url":"https://api.github.com/users/marechal-p","html_url":"https://github.com/marechal-p","followers_url":"https://api.github.com/users/marechal-p/followers","following_url":"https://api.github.com/users/marechal-p/following{/other_user}","gists_url":"https://api.github.com/users/marechal-p/gists{/gist_id}","starred_url":"https://api.github.com/users/marechal-p/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marechal-p/subscriptions","organizations_url":"https://api.github.com/users/marechal-p/orgs","repos_url":"https://api.github.com/users/marechal-p/repos","events_url":"https://api.github.com/users/marechal-p/events{/privacy}","received_events_url":"https://api.github.com/users/marechal-p/received_events","type":"User","site_admin":false},"body":"https://github.com/theia-ide/theia/issues/3604 Do not show the exit code and the signal on successful task execution?","created_at":"2018-11-23T23:15:53Z","updated_at":"2018-11-23T23:18:56Z","html_url":"https://github.com/theia-ide/theia/pull/3236#discussion_r236025630","pull_request_url":"https://api.github.com/repos/theia-ide/theia/pulls/3236","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/theia-ide/theia/pulls/comments/236025630"},"html":{"href":"https://github.com/theia-ide/theia/pull/3236#discussion_r236025630"},"pull_request":{"href":"https://api.github.com/repos/theia-ide/theia/pulls/3236"}}},"pull_request":{"url":"https://api.github.com/repos/theia-ide/theia/pulls/3236","id":224430562,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0NDMwNTYy","html_url":"https://github.com/theia-ide/theia/pull/3236","diff_url":"https://github.com/theia-ide/theia/pull/3236.diff","patch_url":"https://github.com/theia-ide/theia/pull/3236.patch","issue_url":"https://api.github.com/repos/theia-ide/theia/issues/3236","number":3236,"state":"open","locked":false,"title":"Fix task exit messages and task/process API","user":{"login":"simark","id":1758287,"node_id":"MDQ6VXNlcjE3NTgyODc=","avatar_url":"https://avatars0.githubusercontent.com/u/1758287?v=4","gravatar_id":"","url":"https://api.github.com/users/simark","html_url":"https://github.com/simark","followers_url":"https://api.github.com/users/simark/followers","following_url":"https://api.github.com/users/simark/following{/other_user}","gists_url":"https://api.github.com/users/simark/gists{/gist_id}","starred_url":"https://api.github.com/users/simark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simark/subscriptions","organizations_url":"https://api.github.com/users/simark/orgs","repos_url":"https://api.github.com/users/simark/repos","events_url":"https://api.github.com/users/simark/events{/privacy}","received_events_url":"https://api.github.com/users/simark/received_events","type":"User","site_admin":false},"body":"The original intention for this patch is this fix the message that\r\nappears when tasks exit.  There are many inconsistencies:\r\n\r\ntask of type shell exits with exit code 0:\r\n  Success - Task 2 has finished. exit code: 0, signal: undefined\r\n\r\ntask of type process exits with exit code 0:\r\n  Success - Task 7 has finished. exit code: 0, signal: null\r\n\r\ntask of type shell exits with exit code 2:\r\n  Error: Task 1 failed. Exit code: 2, signal: undefined\r\n\r\ntask of type process exits with exit code 2:\r\n  Error: Task 8 failed. Exit code: 2, signal: null\r\n\r\ntask of type shell terminated by signal SIGUSR2:\r\n  Interrupt received - Task 3 has finished. exit code: 0, signal: 12\r\n\r\ntask of type process terminated by signal SIGUSR2:\r\n  Error: Task 5 failed. Exit code: null, signal: SIGUSR2\r\n\r\nThere are a some problems:\r\n\r\n1. There is always either an exit code, either a signal, never both.  So\r\n   we don't need to show both (the \"undefined\" or \"null\" are particularly\r\n   annoying).\r\n2. We should show signal names for all signals.  That signal name should\r\n   be provided by the backend and not interpreted by the frontend,\r\n   because they vary per OS.\r\n3. Whether receiving a signal is an error is debatable, some signals can\r\n   be expected.  Receiving a SIGSEGV is probably not, though.\r\n\r\nThere are a lot of inconsistencies with how node's child_process module\r\nand the node-pty module report their exit events.  This patch tries to\r\nnormalize them so we get something predictable in the frontend.\r\n\r\nEnd-to-end, I made the \"code\" value optional, so that when a signal is\r\nreported, code will be undefined (compared to now where it will be 0).\r\n\r\nRandom notes:\r\n\r\n- I found setting \"strictFunctionTypes\" in the compile.tsconfig.json was\r\n  helpful for this, and it can only help in general, so I suggest we\r\n  leave it.\r\n- To use Object.entries, I had to change the lib we use to es2017.\r\n  Since the version of typescript and node we use supports it, I don't see any\r\n  downside.\r\n- I removed the messages like \"Interrupt received\" in the messages.  I\r\n  think they were a bit misleading.  If we want to have an \"official\"\r\n  signal description, we should use the descriptions returned by\r\n  strsignal(3).\r\n\r\nChange-Id: I20d2dec8e131d95018cc6f1bf7bdf1876c662811\r\nSigned-off-by: Simon Marchi <simon.marchi@ericsson.com>\r\n\r\n<!-- Please provide a clear and meaningful description to the CHANGELOG.md file if this PR contributes some significant changes -->\r\n","created_at":"2018-10-19T23:02:21Z","updated_at":"2018-11-23T23:18:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"06f2ab141d49e796c8d4ca014d4ede0ebc9a24f7","assignee":null,"assignees":[],"requested_reviewers":[{"login":"akosyakov","id":3082655,"node_id":"MDQ6VXNlcjMwODI2NTU=","avatar_url":"https://avatars2.githubusercontent.com/u/3082655?v=4","gravatar_id":"","url":"https://api.github.com/users/akosyakov","html_url":"https://github.com/akosyakov","followers_url":"https://api.github.com/users/akosyakov/followers","following_url":"https://api.github.com/users/akosyakov/following{/other_user}","gists_url":"https://api.github.com/users/akosyakov/gists{/gist_id}","starred_url":"https://api.github.com/users/akosyakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akosyakov/subscriptions","organizations_url":"https://api.github.com/users/akosyakov/orgs","repos_url":"https://api.github.com/users/akosyakov/repos","events_url":"https://api.github.com/users/akosyakov/events{/privacy}","received_events_url":"https://api.github.com/users/akosyakov/received_events","type":"User","site_admin":false},{"login":"marcdumais-work","id":25749063,"node_id":"MDQ6VXNlcjI1NzQ5MDYz","avatar_url":"https://avatars2.githubusercontent.com/u/25749063?v=4","gravatar_id":"","url":"https://api.github.com/users/marcdumais-work","html_url":"https://github.com/marcdumais-work","followers_url":"https://api.github.com/users/marcdumais-work/followers","following_url":"https://api.github.com/users/marcdumais-work/following{/other_user}","gists_url":"https://api.github.com/users/marcdumais-work/gists{/gist_id}","starred_url":"https://api.github.com/users/marcdumais-work/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcdumais-work/subscriptions","organizations_url":"https://api.github.com/users/marcdumais-work/orgs","repos_url":"https://api.github.com/users/marcdumais-work/repos","events_url":"https://api.github.com/users/marcdumais-work/events{/privacy}","received_events_url":"https://api.github.com/users/marcdumais-work/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/theia-ide/theia/pulls/3236/commits","review_comments_url":"https://api.github.com/repos/theia-ide/theia/pulls/3236/comments","review_comment_url":"https://api.github.com/repos/theia-ide/theia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/theia-ide/theia/issues/3236/comments","statuses_url":"https://api.github.com/repos/theia-ide/theia/statuses/2f782b137e406a4909abe4beb7904a83c1352639","head":{"label":"theia-ide:alain_gregoire","ref":"alain_gregoire","sha":"2f782b137e406a4909abe4beb7904a83c1352639","user":{"login":"theia-ide","id":28530323,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4NTMwMzIz","avatar_url":"https://avatars1.githubusercontent.com/u/28530323?v=4","gravatar_id":"","url":"https://api.github.com/users/theia-ide","html_url":"https://github.com/theia-ide","followers_url":"https://api.github.com/users/theia-ide/followers","following_url":"https://api.github.com/users/theia-ide/following{/other_user}","gists_url":"https://api.github.com/users/theia-ide/gists{/gist_id}","starred_url":"https://api.github.com/users/theia-ide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theia-ide/subscriptions","organizations_url":"https://api.github.com/users/theia-ide/orgs","repos_url":"https://api.github.com/users/theia-ide/repos","events_url":"https://api.github.com/users/theia-ide/events{/privacy}","received_events_url":"https://api.github.com/users/theia-ide/received_events","type":"Organization","site_admin":false},"repo":{"id":83050680,"node_id":"MDEwOlJlcG9zaXRvcnk4MzA1MDY4MA==","name":"theia","full_name":"theia-ide/theia","private":false,"owner":{"login":"theia-ide","id":28530323,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4NTMwMzIz","avatar_url":"https://avatars1.githubusercontent.com/u/28530323?v=4","gravatar_id":"","url":"https://api.github.com/users/theia-ide","html_url":"https://github.com/theia-ide","followers_url":"https://api.github.com/users/theia-ide/followers","following_url":"https://api.github.com/users/theia-ide/following{/other_user}","gists_url":"https://api.github.com/users/theia-ide/gists{/gist_id}","starred_url":"https://api.github.com/users/theia-ide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theia-ide/subscriptions","organizations_url":"https://api.github.com/users/theia-ide/orgs","repos_url":"https://api.github.com/users/theia-ide/repos","events_url":"https://api.github.com/users/theia-ide/events{/privacy}","received_events_url":"https://api.github.com/users/theia-ide/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/theia-ide/theia","description":"Theia is a cloud & desktop IDE framework implemented in TypeScript.","fork":false,"url":"https://api.github.com/repos/theia-ide/theia","forks_url":"https://api.github.com/repos/theia-ide/theia/forks","keys_url":"https://api.github.com/repos/theia-ide/theia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/theia-ide/theia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/theia-ide/theia/teams","hooks_url":"https://api.github.com/repos/theia-ide/theia/hooks","issue_events_url":"https://api.github.com/repos/theia-ide/theia/issues/events{/number}","events_url":"https://api.github.com/repos/theia-ide/theia/events","assignees_url":"https://api.github.com/repos/theia-ide/theia/assignees{/user}","branches_url":"https://api.github.com/repos/theia-ide/theia/branches{/branch}","tags_url":"https://api.github.com/repos/theia-ide/theia/tags","blobs_url":"https://api.github.com/repos/theia-ide/theia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/theia-ide/theia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/theia-ide/theia/git/refs{/sha}","trees_url":"https://api.github.com/repos/theia-ide/theia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/theia-ide/theia/statuses/{sha}","languages_url":"https://api.github.com/repos/theia-ide/theia/languages","stargazers_url":"https://api.github.com/repos/theia-ide/theia/stargazers","contributors_url":"https://api.github.com/repos/theia-ide/theia/contributors","subscribers_url":"https://api.github.com/repos/theia-ide/theia/subscribers","subscription_url":"https://api.github.com/repos/theia-ide/theia/subscription","commits_url":"https://api.github.com/repos/theia-ide/theia/commits{/sha}","git_commits_url":"https://api.github.com/repos/theia-ide/theia/git/commits{/sha}","comments_url":"https://api.github.com/repos/theia-ide/theia/comments{/number}","issue_comment_url":"https://api.github.com/repos/theia-ide/theia/issues/comments{/number}","contents_url":"https://api.github.com/repos/theia-ide/theia/contents/{+path}","compare_url":"https://api.github.com/repos/theia-ide/theia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/theia-ide/theia/merges","archive_url":"https://api.github.com/repos/theia-ide/theia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/theia-ide/theia/downloads","issues_url":"https://api.github.com/repos/theia-ide/theia/issues{/number}","pulls_url":"https://api.github.com/repos/theia-ide/theia/pulls{/number}","milestones_url":"https://api.github.com/repos/theia-ide/theia/milestones{/number}","notifications_url":"https://api.github.com/repos/theia-ide/theia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/theia-ide/theia/labels{/name}","releases_url":"https://api.github.com/repos/theia-ide/theia/releases{/id}","deployments_url":"https://api.github.com/repos/theia-ide/theia/deployments","created_at":"2017-02-24T14:42:05Z","updated_at":"2018-11-23T20:18:37Z","pushed_at":"2018-11-23T23:08:30Z","git_url":"git://github.com/theia-ide/theia.git","ssh_url":"git@github.com:theia-ide/theia.git","clone_url":"https://github.com/theia-ide/theia.git","svn_url":"https://github.com/theia-ide/theia","homepage":"http://theia-ide.org","size":112199,"stargazers_count":1922,"watchers_count":1922,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":287,"mirror_url":null,"archived":false,"open_issues_count":717,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":287,"open_issues":717,"watchers":1922,"default_branch":"master"}},"base":{"label":"theia-ide:master","ref":"master","sha":"93c16bb9f604a37745809f7b8a561dbb16a65125","user":{"login":"theia-ide","id":28530323,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4NTMwMzIz","avatar_url":"https://avatars1.githubusercontent.com/u/28530323?v=4","gravatar_id":"","url":"https://api.github.com/users/theia-ide","html_url":"https://github.com/theia-ide","followers_url":"https://api.github.com/users/theia-ide/followers","following_url":"https://api.github.com/users/theia-ide/following{/other_user}","gists_url":"https://api.github.com/users/theia-ide/gists{/gist_id}","starred_url":"https://api.github.com/users/theia-ide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theia-ide/subscriptions","organizations_url":"https://api.github.com/users/theia-ide/orgs","repos_url":"https://api.github.com/users/theia-ide/repos","events_url":"https://api.github.com/users/theia-ide/events{/privacy}","received_events_url":"https://api.github.com/users/theia-ide/received_events","type":"Organization","site_admin":false},"repo":{"id":83050680,"node_id":"MDEwOlJlcG9zaXRvcnk4MzA1MDY4MA==","name":"theia","full_name":"theia-ide/theia","private":false,"owner":{"login":"theia-ide","id":28530323,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4NTMwMzIz","avatar_url":"https://avatars1.githubusercontent.com/u/28530323?v=4","gravatar_id":"","url":"https://api.github.com/users/theia-ide","html_url":"https://github.com/theia-ide","followers_url":"https://api.github.com/users/theia-ide/followers","following_url":"https://api.github.com/users/theia-ide/following{/other_user}","gists_url":"https://api.github.com/users/theia-ide/gists{/gist_id}","starred_url":"https://api.github.com/users/theia-ide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theia-ide/subscriptions","organizations_url":"https://api.github.com/users/theia-ide/orgs","repos_url":"https://api.github.com/users/theia-ide/repos","events_url":"https://api.github.com/users/theia-ide/events{/privacy}","received_events_url":"https://api.github.com/users/theia-ide/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/theia-ide/theia","description":"Theia is a cloud & desktop IDE framework implemented in TypeScript.","fork":false,"url":"https://api.github.com/repos/theia-ide/theia","forks_url":"https://api.github.com/repos/theia-ide/theia/forks","keys_url":"https://api.github.com/repos/theia-ide/theia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/theia-ide/theia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/theia-ide/theia/teams","hooks_url":"https://api.github.com/repos/theia-ide/theia/hooks","issue_events_url":"https://api.github.com/repos/theia-ide/theia/issues/events{/number}","events_url":"https://api.github.com/repos/theia-ide/theia/events","assignees_url":"https://api.github.com/repos/theia-ide/theia/assignees{/user}","branches_url":"https://api.github.com/repos/theia-ide/theia/branches{/branch}","tags_url":"https://api.github.com/repos/theia-ide/theia/tags","blobs_url":"https://api.github.com/repos/theia-ide/theia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/theia-ide/theia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/theia-ide/theia/git/refs{/sha}","trees_url":"https://api.github.com/repos/theia-ide/theia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/theia-ide/theia/statuses/{sha}","languages_url":"https://api.github.com/repos/theia-ide/theia/languages","stargazers_url":"https://api.github.com/repos/theia-ide/theia/stargazers","contributors_url":"https://api.github.com/repos/theia-ide/theia/contributors","subscribers_url":"https://api.github.com/repos/theia-ide/theia/subscribers","subscription_url":"https://api.github.com/repos/theia-ide/theia/subscription","commits_url":"https://api.github.com/repos/theia-ide/theia/commits{/sha}","git_commits_url":"https://api.github.com/repos/theia-ide/theia/git/commits{/sha}","comments_url":"https://api.github.com/repos/theia-ide/theia/comments{/number}","issue_comment_url":"https://api.github.com/repos/theia-ide/theia/issues/comments{/number}","contents_url":"https://api.github.com/repos/theia-ide/theia/contents/{+path}","compare_url":"https://api.github.com/repos/theia-ide/theia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/theia-ide/theia/merges","archive_url":"https://api.github.com/repos/theia-ide/theia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/theia-ide/theia/downloads","issues_url":"https://api.github.com/repos/theia-ide/theia/issues{/number}","pulls_url":"https://api.github.com/repos/theia-ide/theia/pulls{/number}","milestones_url":"https://api.github.com/repos/theia-ide/theia/milestones{/number}","notifications_url":"https://api.github.com/repos/theia-ide/theia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/theia-ide/theia/labels{/name}","releases_url":"https://api.github.com/repos/theia-ide/theia/releases{/id}","deployments_url":"https://api.github.com/repos/theia-ide/theia/deployments","created_at":"2017-02-24T14:42:05Z","updated_at":"2018-11-23T20:18:37Z","pushed_at":"2018-11-23T23:08:30Z","git_url":"git://github.com/theia-ide/theia.git","ssh_url":"git@github.com:theia-ide/theia.git","clone_url":"https://github.com/theia-ide/theia.git","svn_url":"https://github.com/theia-ide/theia","homepage":"http://theia-ide.org","size":112199,"stargazers_count":1922,"watchers_count":1922,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":287,"mirror_url":null,"archived":false,"open_issues_count":717,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":287,"open_issues":717,"watchers":1922,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/theia-ide/theia/pulls/3236"},"html":{"href":"https://github.com/theia-ide/theia/pull/3236"},"issue":{"href":"https://api.github.com/repos/theia-ide/theia/issues/3236"},"comments":{"href":"https://api.github.com/repos/theia-ide/theia/issues/3236/comments"},"review_comments":{"href":"https://api.github.com/repos/theia-ide/theia/pulls/3236/comments"},"review_comment":{"href":"https://api.github.com/repos/theia-ide/theia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/theia-ide/theia/pulls/3236/commits"},"statuses":{"href":"https://api.github.com/repos/theia-ide/theia/statuses/2f782b137e406a4909abe4beb7904a83c1352639"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"marechal-p"}}