{"action":"created","comment":{"url":"https://api.github.com/repos/m-lab/ndt/pulls/comments/46352465","id":46352465,"diff_hunk":"@@ -382,6 +382,9 @@ int test_s2c(Connection *ctl, tcp_stat_agent *agent, TestOptions *testOptions,\n           log_println(0, \"S2C test error: can't create pipe.\");\n         } else {\n           if ((s2c_childpid = fork()) == 0) {\n+            // Don't capture more than 12 seconds of packet traces:\n+            //   10 second test + 2 seconds of slop\n+            alarm(12);","path":"src/test_s2c_srv.c","position":6,"original_position":6,"commit_id":"fbd69bc6dc6c99f2161361dcf794a9b6a1d42cb8","original_commit_id":"fbd69bc6dc6c99f2161361dcf794a9b6a1d42cb8","user":{"login":"pboothe","id":143798,"avatar_url":"https://avatars.githubusercontent.com/u/143798?v=3","gravatar_id":"","url":"https://api.github.com/users/pboothe","html_url":"https://github.com/pboothe","followers_url":"https://api.github.com/users/pboothe/followers","following_url":"https://api.github.com/users/pboothe/following{/other_user}","gists_url":"https://api.github.com/users/pboothe/gists{/gist_id}","starred_url":"https://api.github.com/users/pboothe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pboothe/subscriptions","organizations_url":"https://api.github.com/users/pboothe/orgs","repos_url":"https://api.github.com/users/pboothe/repos","events_url":"https://api.github.com/users/pboothe/events{/privacy}","received_events_url":"https://api.github.com/users/pboothe/received_events","type":"User","site_admin":false},"body":"Slop is arbitrary, the c2s test has a random 2 second sleep() in it to fix a race condition, and 10 seconds is the length of the test. I thought the comments explained it well, but I can certainly make named constants if you want. I was trying to avoid touching a lot of files.","created_at":"2015-12-01T22:52:13Z","updated_at":"2015-12-01T22:52:13Z","html_url":"https://github.com/m-lab/ndt/pull/16#discussion_r46352465","pull_request_url":"https://api.github.com/repos/m-lab/ndt/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/m-lab/ndt/pulls/comments/46352465"},"html":{"href":"https://github.com/m-lab/ndt/pull/16#discussion_r46352465"},"pull_request":{"href":"https://api.github.com/repos/m-lab/ndt/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/m-lab/ndt/pulls/16","id":52308015,"html_url":"https://github.com/m-lab/ndt/pull/16","diff_url":"https://github.com/m-lab/ndt/pull/16.diff","patch_url":"https://github.com/m-lab/ndt/pull/16.patch","issue_url":"https://api.github.com/repos/m-lab/ndt/issues/16","number":16,"state":"open","locked":false,"title":"Make sure every fork()ed subprocess has a watchdog timer.","user":{"login":"pboothe","id":143798,"avatar_url":"https://avatars.githubusercontent.com/u/143798?v=3","gravatar_id":"","url":"https://api.github.com/users/pboothe","html_url":"https://github.com/pboothe","followers_url":"https://api.github.com/users/pboothe/followers","following_url":"https://api.github.com/users/pboothe/following{/other_user}","gists_url":"https://api.github.com/users/pboothe/gists{/gist_id}","starred_url":"https://api.github.com/users/pboothe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pboothe/subscriptions","organizations_url":"https://api.github.com/users/pboothe/orgs","repos_url":"https://api.github.com/users/pboothe/repos","events_url":"https://api.github.com/users/pboothe/events{/privacy}","received_events_url":"https://api.github.com/users/pboothe/received_events","type":"User","site_admin":false},"body":"Adds two alarm() calls which will act as watchdog timers for the c2s process to prevent runaway packet captures.","created_at":"2015-12-01T20:03:24Z","updated_at":"2015-12-01T22:52:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d9a1b3151c8424a34a2ad1c5d5aa78f8bc7f21e5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/m-lab/ndt/pulls/16/commits","review_comments_url":"https://api.github.com/repos/m-lab/ndt/pulls/16/comments","review_comment_url":"https://api.github.com/repos/m-lab/ndt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/m-lab/ndt/issues/16/comments","statuses_url":"https://api.github.com/repos/m-lab/ndt/statuses/fbd69bc6dc6c99f2161361dcf794a9b6a1d42cb8","head":{"label":"pboothe:pcap_fix","ref":"pcap_fix","sha":"fbd69bc6dc6c99f2161361dcf794a9b6a1d42cb8","user":{"login":"pboothe","id":143798,"avatar_url":"https://avatars.githubusercontent.com/u/143798?v=3","gravatar_id":"","url":"https://api.github.com/users/pboothe","html_url":"https://github.com/pboothe","followers_url":"https://api.github.com/users/pboothe/followers","following_url":"https://api.github.com/users/pboothe/following{/other_user}","gists_url":"https://api.github.com/users/pboothe/gists{/gist_id}","starred_url":"https://api.github.com/users/pboothe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pboothe/subscriptions","organizations_url":"https://api.github.com/users/pboothe/orgs","repos_url":"https://api.github.com/users/pboothe/repos","events_url":"https://api.github.com/users/pboothe/events{/privacy}","received_events_url":"https://api.github.com/users/pboothe/received_events","type":"User","site_admin":false},"repo":{"id":47213247,"name":"ndt","full_name":"pboothe/ndt","owner":{"login":"pboothe","id":143798,"avatar_url":"https://avatars.githubusercontent.com/u/143798?v=3","gravatar_id":"","url":"https://api.github.com/users/pboothe","html_url":"https://github.com/pboothe","followers_url":"https://api.github.com/users/pboothe/followers","following_url":"https://api.github.com/users/pboothe/following{/other_user}","gists_url":"https://api.github.com/users/pboothe/gists{/gist_id}","starred_url":"https://api.github.com/users/pboothe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pboothe/subscriptions","organizations_url":"https://api.github.com/users/pboothe/orgs","repos_url":"https://api.github.com/users/pboothe/repos","events_url":"https://api.github.com/users/pboothe/events{/privacy}","received_events_url":"https://api.github.com/users/pboothe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pboothe/ndt","description":"Network Diagnostic Tool","fork":true,"url":"https://api.github.com/repos/pboothe/ndt","forks_url":"https://api.github.com/repos/pboothe/ndt/forks","keys_url":"https://api.github.com/repos/pboothe/ndt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pboothe/ndt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pboothe/ndt/teams","hooks_url":"https://api.github.com/repos/pboothe/ndt/hooks","issue_events_url":"https://api.github.com/repos/pboothe/ndt/issues/events{/number}","events_url":"https://api.github.com/repos/pboothe/ndt/events","assignees_url":"https://api.github.com/repos/pboothe/ndt/assignees{/user}","branches_url":"https://api.github.com/repos/pboothe/ndt/branches{/branch}","tags_url":"https://api.github.com/repos/pboothe/ndt/tags","blobs_url":"https://api.github.com/repos/pboothe/ndt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pboothe/ndt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pboothe/ndt/git/refs{/sha}","trees_url":"https://api.github.com/repos/pboothe/ndt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pboothe/ndt/statuses/{sha}","languages_url":"https://api.github.com/repos/pboothe/ndt/languages","stargazers_url":"https://api.github.com/repos/pboothe/ndt/stargazers","contributors_url":"https://api.github.com/repos/pboothe/ndt/contributors","subscribers_url":"https://api.github.com/repos/pboothe/ndt/subscribers","subscription_url":"https://api.github.com/repos/pboothe/ndt/subscription","commits_url":"https://api.github.com/repos/pboothe/ndt/commits{/sha}","git_commits_url":"https://api.github.com/repos/pboothe/ndt/git/commits{/sha}","comments_url":"https://api.github.com/repos/pboothe/ndt/comments{/number}","issue_comment_url":"https://api.github.com/repos/pboothe/ndt/issues/comments{/number}","contents_url":"https://api.github.com/repos/pboothe/ndt/contents/{+path}","compare_url":"https://api.github.com/repos/pboothe/ndt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pboothe/ndt/merges","archive_url":"https://api.github.com/repos/pboothe/ndt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pboothe/ndt/downloads","issues_url":"https://api.github.com/repos/pboothe/ndt/issues{/number}","pulls_url":"https://api.github.com/repos/pboothe/ndt/pulls{/number}","milestones_url":"https://api.github.com/repos/pboothe/ndt/milestones{/number}","notifications_url":"https://api.github.com/repos/pboothe/ndt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pboothe/ndt/labels{/name}","releases_url":"https://api.github.com/repos/pboothe/ndt/releases{/id}","created_at":"2015-12-01T19:47:22Z","updated_at":"2015-12-01T19:47:24Z","pushed_at":"2015-12-01T20:02:36Z","git_url":"git://github.com/pboothe/ndt.git","ssh_url":"git@github.com:pboothe/ndt.git","clone_url":"https://github.com/pboothe/ndt.git","svn_url":"https://github.com/pboothe/ndt","homepage":null,"size":4114,"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":"master"}},"base":{"label":"m-lab:master","ref":"master","sha":"1801f1082af39e2b8d0cbf9b14dadd8749752535","user":{"login":"m-lab","id":3496264,"avatar_url":"https://avatars.githubusercontent.com/u/3496264?v=3","gravatar_id":"","url":"https://api.github.com/users/m-lab","html_url":"https://github.com/m-lab","followers_url":"https://api.github.com/users/m-lab/followers","following_url":"https://api.github.com/users/m-lab/following{/other_user}","gists_url":"https://api.github.com/users/m-lab/gists{/gist_id}","starred_url":"https://api.github.com/users/m-lab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-lab/subscriptions","organizations_url":"https://api.github.com/users/m-lab/orgs","repos_url":"https://api.github.com/users/m-lab/repos","events_url":"https://api.github.com/users/m-lab/events{/privacy}","received_events_url":"https://api.github.com/users/m-lab/received_events","type":"Organization","site_admin":false},"repo":{"id":33625942,"name":"ndt","full_name":"m-lab/ndt","owner":{"login":"m-lab","id":3496264,"avatar_url":"https://avatars.githubusercontent.com/u/3496264?v=3","gravatar_id":"","url":"https://api.github.com/users/m-lab","html_url":"https://github.com/m-lab","followers_url":"https://api.github.com/users/m-lab/followers","following_url":"https://api.github.com/users/m-lab/following{/other_user}","gists_url":"https://api.github.com/users/m-lab/gists{/gist_id}","starred_url":"https://api.github.com/users/m-lab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-lab/subscriptions","organizations_url":"https://api.github.com/users/m-lab/orgs","repos_url":"https://api.github.com/users/m-lab/repos","events_url":"https://api.github.com/users/m-lab/events{/privacy}","received_events_url":"https://api.github.com/users/m-lab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/m-lab/ndt","description":"Network Diagnostic Tool","fork":true,"url":"https://api.github.com/repos/m-lab/ndt","forks_url":"https://api.github.com/repos/m-lab/ndt/forks","keys_url":"https://api.github.com/repos/m-lab/ndt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/m-lab/ndt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/m-lab/ndt/teams","hooks_url":"https://api.github.com/repos/m-lab/ndt/hooks","issue_events_url":"https://api.github.com/repos/m-lab/ndt/issues/events{/number}","events_url":"https://api.github.com/repos/m-lab/ndt/events","assignees_url":"https://api.github.com/repos/m-lab/ndt/assignees{/user}","branches_url":"https://api.github.com/repos/m-lab/ndt/branches{/branch}","tags_url":"https://api.github.com/repos/m-lab/ndt/tags","blobs_url":"https://api.github.com/repos/m-lab/ndt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/m-lab/ndt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/m-lab/ndt/git/refs{/sha}","trees_url":"https://api.github.com/repos/m-lab/ndt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/m-lab/ndt/statuses/{sha}","languages_url":"https://api.github.com/repos/m-lab/ndt/languages","stargazers_url":"https://api.github.com/repos/m-lab/ndt/stargazers","contributors_url":"https://api.github.com/repos/m-lab/ndt/contributors","subscribers_url":"https://api.github.com/repos/m-lab/ndt/subscribers","subscription_url":"https://api.github.com/repos/m-lab/ndt/subscription","commits_url":"https://api.github.com/repos/m-lab/ndt/commits{/sha}","git_commits_url":"https://api.github.com/repos/m-lab/ndt/git/commits{/sha}","comments_url":"https://api.github.com/repos/m-lab/ndt/comments{/number}","issue_comment_url":"https://api.github.com/repos/m-lab/ndt/issues/comments{/number}","contents_url":"https://api.github.com/repos/m-lab/ndt/contents/{+path}","compare_url":"https://api.github.com/repos/m-lab/ndt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/m-lab/ndt/merges","archive_url":"https://api.github.com/repos/m-lab/ndt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/m-lab/ndt/downloads","issues_url":"https://api.github.com/repos/m-lab/ndt/issues{/number}","pulls_url":"https://api.github.com/repos/m-lab/ndt/pulls{/number}","milestones_url":"https://api.github.com/repos/m-lab/ndt/milestones{/number}","notifications_url":"https://api.github.com/repos/m-lab/ndt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/m-lab/ndt/labels{/name}","releases_url":"https://api.github.com/repos/m-lab/ndt/releases{/id}","created_at":"2015-04-08T18:54:07Z","updated_at":"2015-09-16T08:56:52Z","pushed_at":"2015-12-01T20:03:24Z","git_url":"git://github.com/m-lab/ndt.git","ssh_url":"git@github.com:m-lab/ndt.git","clone_url":"https://github.com/m-lab/ndt.git","svn_url":"https://github.com/m-lab/ndt","homepage":null,"size":4116,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/m-lab/ndt/pulls/16"},"html":{"href":"https://github.com/m-lab/ndt/pull/16"},"issue":{"href":"https://api.github.com/repos/m-lab/ndt/issues/16"},"comments":{"href":"https://api.github.com/repos/m-lab/ndt/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/m-lab/ndt/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/m-lab/ndt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/m-lab/ndt/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/m-lab/ndt/statuses/fbd69bc6dc6c99f2161361dcf794a9b6a1d42cb8"}}}}