{"action":"created","comment":{"url":"https://api.github.com/repos/OPENDAP/bes/pulls/comments/48856480","id":48856480,"diff_hunk":"@@ -32,18 +32,18 @@\n \n #include \"config.h\"\n \n-#include <string>\n-#include <sstream>\n-#include <iostream>\n+#include <cstdlib>\n \n+#include <signal.h>\n #if HAVE_UNISTD_H\n #include <unistd.h>\n #endif\n \n-using std::string;\n-using std::ostringstream;\n-using std::bad_alloc;\n-using std::cout;\n+#include <setjmp.h> // Used for the timeout processing","path":"dispatch/BESInterface.cc","position":18,"original_position":18,"commit_id":"fcdfaac0b19e4f2f253d73efe69b85ee1aefcbdb","original_commit_id":"fcdfaac0b19e4f2f253d73efe69b85ee1aefcbdb","user":{"login":"jgallagher59701","id":8326698,"avatar_url":"https://avatars.githubusercontent.com/u/8326698?v=3","gravatar_id":"","url":"https://api.github.com/users/jgallagher59701","html_url":"https://github.com/jgallagher59701","followers_url":"https://api.github.com/users/jgallagher59701/followers","following_url":"https://api.github.com/users/jgallagher59701/following{/other_user}","gists_url":"https://api.github.com/users/jgallagher59701/gists{/gist_id}","starred_url":"https://api.github.com/users/jgallagher59701/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgallagher59701/subscriptions","organizations_url":"https://api.github.com/users/jgallagher59701/orgs","repos_url":"https://api.github.com/users/jgallagher59701/repos","events_url":"https://api.github.com/users/jgallagher59701/events{/privacy}","received_events_url":"https://api.github.com/users/jgallagher59701/received_events","type":"User","site_admin":false},"body":"\n\nOn January 4, 2016 at 6:00:35 PM, Patrick West (notifications@github.com) wrote:\n\nIn dispatch/BESInterface.cc:\n\n>  #if HAVE_UNISTD_H\n>  #include <unistd.h>\n>  #endif\n>   \n> -using std::string;\n> -using std::ostringstream;\n> -using std::bad_alloc;\n> -using std::cout;\n> +#include <setjmp.h> // Used for the timeout processing\nshould this be conditional based on if on windows system? I've seen the macros in other places but not here. Or is this a generic include?\n\nAFAIK we don’t have a windows build for the BES. \n\n\n—\nReply to this email directly or view it on GitHub.\n\n\n-- \nJames Gallagher\njgallagher@opendap.org","created_at":"2016-01-05T15:33:46Z","updated_at":"2016-01-05T15:33:46Z","html_url":"https://github.com/OPENDAP/bes/pull/14#discussion_r48856480","pull_request_url":"https://api.github.com/repos/OPENDAP/bes/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/OPENDAP/bes/pulls/comments/48856480"},"html":{"href":"https://github.com/OPENDAP/bes/pull/14#discussion_r48856480"},"pull_request":{"href":"https://api.github.com/repos/OPENDAP/bes/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/OPENDAP/bes/pulls/14","id":54826284,"html_url":"https://github.com/OPENDAP/bes/pull/14","diff_url":"https://github.com/OPENDAP/bes/pull/14.diff","patch_url":"https://github.com/OPENDAP/bes/pull/14.patch","issue_url":"https://api.github.com/repos/OPENDAP/bes/issues/14","number":14,"state":"open","locked":false,"title":"Bes 38","user":{"login":"jgallagher59701","id":8326698,"avatar_url":"https://avatars.githubusercontent.com/u/8326698?v=3","gravatar_id":"","url":"https://api.github.com/users/jgallagher59701","html_url":"https://github.com/jgallagher59701","followers_url":"https://api.github.com/users/jgallagher59701/followers","following_url":"https://api.github.com/users/jgallagher59701/following{/other_user}","gists_url":"https://api.github.com/users/jgallagher59701/gists{/gist_id}","starred_url":"https://api.github.com/users/jgallagher59701/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgallagher59701/subscriptions","organizations_url":"https://api.github.com/users/jgallagher59701/orgs","repos_url":"https://api.github.com/users/jgallagher59701/repos","events_url":"https://api.github.com/users/jgallagher59701/events{/privacy}","received_events_url":"https://api.github.com/users/jgallagher59701/received_events","type":"User","site_admin":false},"body":"I've added a timeout feature to the BES by modifying the code in BESInterface so that it sets the alarm() to a value specified by a BES Context (that can be passed in from the OLFS, etc.). The handler for the alarm signal uses longjmp to stop whatever is happening when the signal is delivered and return an error to the BES's client. We've added a new kind of BES Error for this, so the OLFS can sort it out. In the process of doing this I have made a number of changes to the timeout code in BESDapResponseBuilder, removing most of what was there for timeouts (it did not work correctly).\r\n\r\nTests for the feature are on the bes-38 branch of the debug_functions module. You may also need to pull libdap to build - at one point that was needed, but I think I removed the dependency. Regardless, I'll be reworking the timeout code there too, since this scheme is much better (i.e., it works).\r\n\r\nI'd like to get this code out to the folks at LARC soon - before ESIP next Wed.\r\n\r\nThanks,\r\nJames","created_at":"2015-12-30T20:14:16Z","updated_at":"2016-01-05T15:33:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"45957bdb5bb61f766a24c79fea5271a0d00190f9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OPENDAP/bes/pulls/14/commits","review_comments_url":"https://api.github.com/repos/OPENDAP/bes/pulls/14/comments","review_comment_url":"https://api.github.com/repos/OPENDAP/bes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OPENDAP/bes/issues/14/comments","statuses_url":"https://api.github.com/repos/OPENDAP/bes/statuses/fcdfaac0b19e4f2f253d73efe69b85ee1aefcbdb","head":{"label":"OPENDAP:bes-38","ref":"bes-38","sha":"fcdfaac0b19e4f2f253d73efe69b85ee1aefcbdb","user":{"login":"OPENDAP","id":8326701,"avatar_url":"https://avatars.githubusercontent.com/u/8326701?v=3","gravatar_id":"","url":"https://api.github.com/users/OPENDAP","html_url":"https://github.com/OPENDAP","followers_url":"https://api.github.com/users/OPENDAP/followers","following_url":"https://api.github.com/users/OPENDAP/following{/other_user}","gists_url":"https://api.github.com/users/OPENDAP/gists{/gist_id}","starred_url":"https://api.github.com/users/OPENDAP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OPENDAP/subscriptions","organizations_url":"https://api.github.com/users/OPENDAP/orgs","repos_url":"https://api.github.com/users/OPENDAP/repos","events_url":"https://api.github.com/users/OPENDAP/events{/privacy}","received_events_url":"https://api.github.com/users/OPENDAP/received_events","type":"Organization","site_admin":false},"repo":{"id":26338366,"name":"bes","full_name":"OPENDAP/bes","owner":{"login":"OPENDAP","id":8326701,"avatar_url":"https://avatars.githubusercontent.com/u/8326701?v=3","gravatar_id":"","url":"https://api.github.com/users/OPENDAP","html_url":"https://github.com/OPENDAP","followers_url":"https://api.github.com/users/OPENDAP/followers","following_url":"https://api.github.com/users/OPENDAP/following{/other_user}","gists_url":"https://api.github.com/users/OPENDAP/gists{/gist_id}","starred_url":"https://api.github.com/users/OPENDAP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OPENDAP/subscriptions","organizations_url":"https://api.github.com/users/OPENDAP/orgs","repos_url":"https://api.github.com/users/OPENDAP/repos","events_url":"https://api.github.com/users/OPENDAP/events{/privacy}","received_events_url":"https://api.github.com/users/OPENDAP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OPENDAP/bes","description":"The BES framework, which forms the basis for the Hyrax server","fork":false,"url":"https://api.github.com/repos/OPENDAP/bes","forks_url":"https://api.github.com/repos/OPENDAP/bes/forks","keys_url":"https://api.github.com/repos/OPENDAP/bes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OPENDAP/bes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OPENDAP/bes/teams","hooks_url":"https://api.github.com/repos/OPENDAP/bes/hooks","issue_events_url":"https://api.github.com/repos/OPENDAP/bes/issues/events{/number}","events_url":"https://api.github.com/repos/OPENDAP/bes/events","assignees_url":"https://api.github.com/repos/OPENDAP/bes/assignees{/user}","branches_url":"https://api.github.com/repos/OPENDAP/bes/branches{/branch}","tags_url":"https://api.github.com/repos/OPENDAP/bes/tags","blobs_url":"https://api.github.com/repos/OPENDAP/bes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OPENDAP/bes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OPENDAP/bes/git/refs{/sha}","trees_url":"https://api.github.com/repos/OPENDAP/bes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OPENDAP/bes/statuses/{sha}","languages_url":"https://api.github.com/repos/OPENDAP/bes/languages","stargazers_url":"https://api.github.com/repos/OPENDAP/bes/stargazers","contributors_url":"https://api.github.com/repos/OPENDAP/bes/contributors","subscribers_url":"https://api.github.com/repos/OPENDAP/bes/subscribers","subscription_url":"https://api.github.com/repos/OPENDAP/bes/subscription","commits_url":"https://api.github.com/repos/OPENDAP/bes/commits{/sha}","git_commits_url":"https://api.github.com/repos/OPENDAP/bes/git/commits{/sha}","comments_url":"https://api.github.com/repos/OPENDAP/bes/comments{/number}","issue_comment_url":"https://api.github.com/repos/OPENDAP/bes/issues/comments{/number}","contents_url":"https://api.github.com/repos/OPENDAP/bes/contents/{+path}","compare_url":"https://api.github.com/repos/OPENDAP/bes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OPENDAP/bes/merges","archive_url":"https://api.github.com/repos/OPENDAP/bes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OPENDAP/bes/downloads","issues_url":"https://api.github.com/repos/OPENDAP/bes/issues{/number}","pulls_url":"https://api.github.com/repos/OPENDAP/bes/pulls{/number}","milestones_url":"https://api.github.com/repos/OPENDAP/bes/milestones{/number}","notifications_url":"https://api.github.com/repos/OPENDAP/bes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OPENDAP/bes/labels{/name}","releases_url":"https://api.github.com/repos/OPENDAP/bes/releases{/id}","created_at":"2014-11-07T21:18:39Z","updated_at":"2015-08-09T19:12:54Z","pushed_at":"2016-01-05T00:47:23Z","git_url":"git://github.com/OPENDAP/bes.git","ssh_url":"git@github.com:OPENDAP/bes.git","clone_url":"https://github.com/OPENDAP/bes.git","svn_url":"https://github.com/OPENDAP/bes","homepage":null,"size":103956,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":1,"default_branch":"master"}},"base":{"label":"OPENDAP:master","ref":"master","sha":"f1ed020bae9c3c816c4dd13ba8c8ac17f4c3db93","user":{"login":"OPENDAP","id":8326701,"avatar_url":"https://avatars.githubusercontent.com/u/8326701?v=3","gravatar_id":"","url":"https://api.github.com/users/OPENDAP","html_url":"https://github.com/OPENDAP","followers_url":"https://api.github.com/users/OPENDAP/followers","following_url":"https://api.github.com/users/OPENDAP/following{/other_user}","gists_url":"https://api.github.com/users/OPENDAP/gists{/gist_id}","starred_url":"https://api.github.com/users/OPENDAP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OPENDAP/subscriptions","organizations_url":"https://api.github.com/users/OPENDAP/orgs","repos_url":"https://api.github.com/users/OPENDAP/repos","events_url":"https://api.github.com/users/OPENDAP/events{/privacy}","received_events_url":"https://api.github.com/users/OPENDAP/received_events","type":"Organization","site_admin":false},"repo":{"id":26338366,"name":"bes","full_name":"OPENDAP/bes","owner":{"login":"OPENDAP","id":8326701,"avatar_url":"https://avatars.githubusercontent.com/u/8326701?v=3","gravatar_id":"","url":"https://api.github.com/users/OPENDAP","html_url":"https://github.com/OPENDAP","followers_url":"https://api.github.com/users/OPENDAP/followers","following_url":"https://api.github.com/users/OPENDAP/following{/other_user}","gists_url":"https://api.github.com/users/OPENDAP/gists{/gist_id}","starred_url":"https://api.github.com/users/OPENDAP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OPENDAP/subscriptions","organizations_url":"https://api.github.com/users/OPENDAP/orgs","repos_url":"https://api.github.com/users/OPENDAP/repos","events_url":"https://api.github.com/users/OPENDAP/events{/privacy}","received_events_url":"https://api.github.com/users/OPENDAP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OPENDAP/bes","description":"The BES framework, which forms the basis for the Hyrax server","fork":false,"url":"https://api.github.com/repos/OPENDAP/bes","forks_url":"https://api.github.com/repos/OPENDAP/bes/forks","keys_url":"https://api.github.com/repos/OPENDAP/bes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OPENDAP/bes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OPENDAP/bes/teams","hooks_url":"https://api.github.com/repos/OPENDAP/bes/hooks","issue_events_url":"https://api.github.com/repos/OPENDAP/bes/issues/events{/number}","events_url":"https://api.github.com/repos/OPENDAP/bes/events","assignees_url":"https://api.github.com/repos/OPENDAP/bes/assignees{/user}","branches_url":"https://api.github.com/repos/OPENDAP/bes/branches{/branch}","tags_url":"https://api.github.com/repos/OPENDAP/bes/tags","blobs_url":"https://api.github.com/repos/OPENDAP/bes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OPENDAP/bes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OPENDAP/bes/git/refs{/sha}","trees_url":"https://api.github.com/repos/OPENDAP/bes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OPENDAP/bes/statuses/{sha}","languages_url":"https://api.github.com/repos/OPENDAP/bes/languages","stargazers_url":"https://api.github.com/repos/OPENDAP/bes/stargazers","contributors_url":"https://api.github.com/repos/OPENDAP/bes/contributors","subscribers_url":"https://api.github.com/repos/OPENDAP/bes/subscribers","subscription_url":"https://api.github.com/repos/OPENDAP/bes/subscription","commits_url":"https://api.github.com/repos/OPENDAP/bes/commits{/sha}","git_commits_url":"https://api.github.com/repos/OPENDAP/bes/git/commits{/sha}","comments_url":"https://api.github.com/repos/OPENDAP/bes/comments{/number}","issue_comment_url":"https://api.github.com/repos/OPENDAP/bes/issues/comments{/number}","contents_url":"https://api.github.com/repos/OPENDAP/bes/contents/{+path}","compare_url":"https://api.github.com/repos/OPENDAP/bes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OPENDAP/bes/merges","archive_url":"https://api.github.com/repos/OPENDAP/bes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OPENDAP/bes/downloads","issues_url":"https://api.github.com/repos/OPENDAP/bes/issues{/number}","pulls_url":"https://api.github.com/repos/OPENDAP/bes/pulls{/number}","milestones_url":"https://api.github.com/repos/OPENDAP/bes/milestones{/number}","notifications_url":"https://api.github.com/repos/OPENDAP/bes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OPENDAP/bes/labels{/name}","releases_url":"https://api.github.com/repos/OPENDAP/bes/releases{/id}","created_at":"2014-11-07T21:18:39Z","updated_at":"2015-08-09T19:12:54Z","pushed_at":"2016-01-05T00:47:23Z","git_url":"git://github.com/OPENDAP/bes.git","ssh_url":"git@github.com:OPENDAP/bes.git","clone_url":"https://github.com/OPENDAP/bes.git","svn_url":"https://github.com/OPENDAP/bes","homepage":null,"size":103956,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OPENDAP/bes/pulls/14"},"html":{"href":"https://github.com/OPENDAP/bes/pull/14"},"issue":{"href":"https://api.github.com/repos/OPENDAP/bes/issues/14"},"comments":{"href":"https://api.github.com/repos/OPENDAP/bes/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/OPENDAP/bes/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/OPENDAP/bes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OPENDAP/bes/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/OPENDAP/bes/statuses/fcdfaac0b19e4f2f253d73efe69b85ee1aefcbdb"}}}}