{"action":"created","comment":{"url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/comments/28767688","id":28767688,"diff_hunk":"@@ -69,41 +69,65 @@ while [ 1 ]; do\n     nohup $instancedir/thormaster_$THORNAME MASTER=$THORMASTER:$THORMASTERPORT 2> /dev/null 1>/dev/null &\n \n     thorpid=$!\n-    if [ \"$thorpid\" -ne \"0\" ]; then \n+    if [[ \"$thorpid\" -ne \"0\" ]]; then\n         echo thormaster$LCR process started pid = $thorpid\n         \n         echo $thorpid > $PID_NAME\n         echo $thorpid > $PID_NAME_BASE\n         wait $thorpid\n         errcode=$?\n-        if [ \"$errcode\" -eq \"0\" ]; then  # allows for CTRL-C or thorstop\n-            echo thor exited cleanly - script stopping\n-            exit 0\n-        fi\n-        echo master exited with errorcode = $errcode\n-        if [ ! -e $SENTINEL ]; then\n-            echo $SENTINEL 'has been removed (1) - script stopping'\n+        case $errcode in\n+        # TEC_Clean\n+        0)  echo \"Thormaster ($thorpid) exited cleanly\"\n             $deploydir/stop_thor $deploydir","path":"initfiles/componentfiles/thor/run_thor","position":87,"original_position":87,"commit_id":"35a76605bcfcef6038e77cd855703d0afd4d383b","original_commit_id":"35a76605bcfcef6038e77cd855703d0afd4d383b","user":{"login":"jakesmith","id":902700,"avatar_url":"https://avatars.githubusercontent.com/u/902700?v=3","gravatar_id":"","url":"https://api.github.com/users/jakesmith","html_url":"https://github.com/jakesmith","followers_url":"https://api.github.com/users/jakesmith/followers","following_url":"https://api.github.com/users/jakesmith/following{/other_user}","gists_url":"https://api.github.com/users/jakesmith/gists{/gist_id}","starred_url":"https://api.github.com/users/jakesmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakesmith/subscriptions","organizations_url":"https://api.github.com/users/jakesmith/orgs","repos_url":"https://api.github.com/users/jakesmith/repos","events_url":"https://api.github.com/users/jakesmith/events{/privacy}","received_events_url":"https://api.github.com/users/jakesmith/received_events","type":"User","site_admin":false},"body":"This is new, if Thor exited cleanly, then it will have shutdown slaves and stop_thor should not be necessary.\r\n","created_at":"2015-04-21T10:55:23Z","updated_at":"2015-04-21T10:55:23Z","html_url":"https://github.com/hpcc-systems/HPCC-Platform/pull/7183#discussion_r28767688","pull_request_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/7183","_links":{"self":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/comments/28767688"},"html":{"href":"https://github.com/hpcc-systems/HPCC-Platform/pull/7183#discussion_r28767688"},"pull_request":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/7183"}}},"pull_request":{"url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/7183","id":32518737,"html_url":"https://github.com/hpcc-systems/HPCC-Platform/pull/7183","diff_url":"https://github.com/hpcc-systems/HPCC-Platform/pull/7183.diff","patch_url":"https://github.com/hpcc-systems/HPCC-Platform/pull/7183.patch","issue_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/7183","number":7183,"state":"open","locked":false,"title":"HPCC-12987 Added case statement for new thor exit codes","user":{"login":"Michael-Gardner","id":7481082,"avatar_url":"https://avatars.githubusercontent.com/u/7481082?v=3","gravatar_id":"","url":"https://api.github.com/users/Michael-Gardner","html_url":"https://github.com/Michael-Gardner","followers_url":"https://api.github.com/users/Michael-Gardner/followers","following_url":"https://api.github.com/users/Michael-Gardner/following{/other_user}","gists_url":"https://api.github.com/users/Michael-Gardner/gists{/gist_id}","starred_url":"https://api.github.com/users/Michael-Gardner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Michael-Gardner/subscriptions","organizations_url":"https://api.github.com/users/Michael-Gardner/orgs","repos_url":"https://api.github.com/users/Michael-Gardner/repos","events_url":"https://api.github.com/users/Michael-Gardner/events{/privacy}","received_events_url":"https://api.github.com/users/Michael-Gardner/received_events","type":"User","site_admin":false},"body":"Case statement to catch and act on different exit codes.  Also added formatting fixes to keep the script in line with all the others.  Only issue I see as a possible problem is case 5.  Not sure if that's the correct way to handle TEC_Swap.  @jakesmith \r\n\r\nSigned-off-by: Michael Gardner <Michael.Gardner@lexisnexis.com>","created_at":"2015-04-02T14:55:29Z","updated_at":"2015-04-21T10:55:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5e1cf2f3032724b908149cbf4cb65a8147e106ed","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/7183/commits","review_comments_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/7183/comments","review_comment_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/7183/comments","statuses_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/statuses/35a76605bcfcef6038e77cd855703d0afd4d383b","head":{"label":"Michael-Gardner:hpcc-12987","ref":"hpcc-12987","sha":"35a76605bcfcef6038e77cd855703d0afd4d383b","user":{"login":"Michael-Gardner","id":7481082,"avatar_url":"https://avatars.githubusercontent.com/u/7481082?v=3","gravatar_id":"","url":"https://api.github.com/users/Michael-Gardner","html_url":"https://github.com/Michael-Gardner","followers_url":"https://api.github.com/users/Michael-Gardner/followers","following_url":"https://api.github.com/users/Michael-Gardner/following{/other_user}","gists_url":"https://api.github.com/users/Michael-Gardner/gists{/gist_id}","starred_url":"https://api.github.com/users/Michael-Gardner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Michael-Gardner/subscriptions","organizations_url":"https://api.github.com/users/Michael-Gardner/orgs","repos_url":"https://api.github.com/users/Michael-Gardner/repos","events_url":"https://api.github.com/users/Michael-Gardner/events{/privacy}","received_events_url":"https://api.github.com/users/Michael-Gardner/received_events","type":"User","site_admin":false},"repo":{"id":24113512,"name":"HPCC-Platform","full_name":"Michael-Gardner/HPCC-Platform","owner":{"login":"Michael-Gardner","id":7481082,"avatar_url":"https://avatars.githubusercontent.com/u/7481082?v=3","gravatar_id":"","url":"https://api.github.com/users/Michael-Gardner","html_url":"https://github.com/Michael-Gardner","followers_url":"https://api.github.com/users/Michael-Gardner/followers","following_url":"https://api.github.com/users/Michael-Gardner/following{/other_user}","gists_url":"https://api.github.com/users/Michael-Gardner/gists{/gist_id}","starred_url":"https://api.github.com/users/Michael-Gardner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Michael-Gardner/subscriptions","organizations_url":"https://api.github.com/users/Michael-Gardner/orgs","repos_url":"https://api.github.com/users/Michael-Gardner/repos","events_url":"https://api.github.com/users/Michael-Gardner/events{/privacy}","received_events_url":"https://api.github.com/users/Michael-Gardner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Michael-Gardner/HPCC-Platform","description":"IMPORTANT - Issue tracking has been migrated to JIRA - use your github ID and password reset mechanism to log in","fork":true,"url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform","forks_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/forks","keys_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/teams","hooks_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/hooks","issue_events_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/issues/events{/number}","events_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/events","assignees_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/assignees{/user}","branches_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/branches{/branch}","tags_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/tags","blobs_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/statuses/{sha}","languages_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/languages","stargazers_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/stargazers","contributors_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/contributors","subscribers_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/subscribers","subscription_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/subscription","commits_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/contents/{+path}","compare_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/merges","archive_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/downloads","issues_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/issues{/number}","pulls_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/pulls{/number}","milestones_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/milestones{/number}","notifications_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/labels{/name}","releases_url":"https://api.github.com/repos/Michael-Gardner/HPCC-Platform/releases{/id}","created_at":"2014-09-16T19:06:46Z","updated_at":"2015-03-30T15:05:42Z","pushed_at":"2015-04-20T19:55:24Z","git_url":"git://github.com/Michael-Gardner/HPCC-Platform.git","ssh_url":"git@github.com:Michael-Gardner/HPCC-Platform.git","clone_url":"https://github.com/Michael-Gardner/HPCC-Platform.git","svn_url":"https://github.com/Michael-Gardner/HPCC-Platform","homepage":"track.hpccsystems.com","size":143085,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"candidate-5.2.0"}},"base":{"label":"hpcc-systems:candidate-5.4.0","ref":"candidate-5.4.0","sha":"c34b5606ecb1e4040a33e0abd86d54ee5d745d1b","user":{"login":"hpcc-systems","id":900867,"avatar_url":"https://avatars.githubusercontent.com/u/900867?v=3","gravatar_id":"","url":"https://api.github.com/users/hpcc-systems","html_url":"https://github.com/hpcc-systems","followers_url":"https://api.github.com/users/hpcc-systems/followers","following_url":"https://api.github.com/users/hpcc-systems/following{/other_user}","gists_url":"https://api.github.com/users/hpcc-systems/gists{/gist_id}","starred_url":"https://api.github.com/users/hpcc-systems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hpcc-systems/subscriptions","organizations_url":"https://api.github.com/users/hpcc-systems/orgs","repos_url":"https://api.github.com/users/hpcc-systems/repos","events_url":"https://api.github.com/users/hpcc-systems/events{/privacy}","received_events_url":"https://api.github.com/users/hpcc-systems/received_events","type":"Organization","site_admin":false},"repo":{"id":2030681,"name":"HPCC-Platform","full_name":"hpcc-systems/HPCC-Platform","owner":{"login":"hpcc-systems","id":900867,"avatar_url":"https://avatars.githubusercontent.com/u/900867?v=3","gravatar_id":"","url":"https://api.github.com/users/hpcc-systems","html_url":"https://github.com/hpcc-systems","followers_url":"https://api.github.com/users/hpcc-systems/followers","following_url":"https://api.github.com/users/hpcc-systems/following{/other_user}","gists_url":"https://api.github.com/users/hpcc-systems/gists{/gist_id}","starred_url":"https://api.github.com/users/hpcc-systems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hpcc-systems/subscriptions","organizations_url":"https://api.github.com/users/hpcc-systems/orgs","repos_url":"https://api.github.com/users/hpcc-systems/repos","events_url":"https://api.github.com/users/hpcc-systems/events{/privacy}","received_events_url":"https://api.github.com/users/hpcc-systems/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hpcc-systems/HPCC-Platform","description":"IMPORTANT - Issue tracking has been migrated to JIRA - use your github ID and password reset mechanism to log in","fork":false,"url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform","forks_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/forks","keys_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/teams","hooks_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/hooks","issue_events_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/events{/number}","events_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/events","assignees_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/assignees{/user}","branches_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/branches{/branch}","tags_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/tags","blobs_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/statuses/{sha}","languages_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/languages","stargazers_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/stargazers","contributors_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/contributors","subscribers_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/subscribers","subscription_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/subscription","commits_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/contents/{+path}","compare_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/merges","archive_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/downloads","issues_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues{/number}","pulls_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls{/number}","milestones_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/milestones{/number}","notifications_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/labels{/name}","releases_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/releases{/id}","created_at":"2011-07-11T14:29:51Z","updated_at":"2015-04-20T13:29:50Z","pushed_at":"2015-04-21T10:34:40Z","git_url":"git://github.com/hpcc-systems/HPCC-Platform.git","ssh_url":"git@github.com:hpcc-systems/HPCC-Platform.git","clone_url":"https://github.com/hpcc-systems/HPCC-Platform.git","svn_url":"https://github.com/hpcc-systems/HPCC-Platform","homepage":"track.hpccsystems.com","size":329054,"stargazers_count":247,"watchers_count":247,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":105,"mirror_url":null,"open_issues_count":430,"forks":105,"open_issues":430,"watchers":247,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/7183"},"html":{"href":"https://github.com/hpcc-systems/HPCC-Platform/pull/7183"},"issue":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/7183"},"comments":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/7183/comments"},"review_comments":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/7183/comments"},"review_comment":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/7183/commits"},"statuses":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/statuses/35a76605bcfcef6038e77cd855703d0afd4d383b"}}}}