{"action":"created","comment":{"url":"https://api.github.com/repos/mobile-shell/mosh/pulls/comments/43694776","id":43694776,"diff_hunk":"@@ -82,6 +82,44 @@ Locale-related environment variable to try as part of a fallback\n environment, if the startup environment does not specify a character\n set of UTF-8.\n \n+.SH ENVIRONMENT VARIABLES\n+These variables allow server-side configuration of Mosh's behavior.\n+They may be set by administrators in system login/rc files,\n+/etc/login.conf, or similar mechanisms, or users in their shell's\n+login/rc files.  \\fBmosh-server\\fP passes these variables to the login\n+session and shell that it starts, but changing them there will have no\n+effect.\n+\n+.TP\n+.B MOSH_SERVER_NETWORK_TMOUT\n+When set to an integer number, this variable specifies how long the\n+server will wait, in seconds, to receive an update from the client\n+before exiting.  Since \\fPmosh\\fP is very useful for mobile clients\n+with intermittent operation and connectivity, we suggest setting this\n+variable to a high value, such as 604800 (one week) or 2592000 (30\n+days).  When not set, \\fBmosh-server\\fP will wait indefinitely for a\n+client to reappear.  This variable is somewhat similar to the\n+\\fBTMOUT\\fP variable found in many Bourne shells.  However, it is not\n+a login-session inactivity timeout; it only applies to network\n+connectivity.\n+\n+.TP\n+.B MOSH_SERVER_NETWORK_TMOUT","path":"man/mosh-server.1","position":26,"original_position":26,"commit_id":"2743427d2a5c114759fdc296147ac4dac2f85d57","original_commit_id":"2743427d2a5c114759fdc296147ac4dac2f85d57","user":{"login":"cgull","id":1934797,"avatar_url":"https://avatars.githubusercontent.com/u/1934797?v=3","gravatar_id":"","url":"https://api.github.com/users/cgull","html_url":"https://github.com/cgull","followers_url":"https://api.github.com/users/cgull/followers","following_url":"https://api.github.com/users/cgull/following{/other_user}","gists_url":"https://api.github.com/users/cgull/gists{/gist_id}","starred_url":"https://api.github.com/users/cgull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgull/subscriptions","organizations_url":"https://api.github.com/users/cgull/orgs","repos_url":"https://api.github.com/users/cgull/repos","events_url":"https://api.github.com/users/cgull/events{/privacy}","received_events_url":"https://api.github.com/users/cgull/received_events","type":"User","site_admin":false},"body":"Yes, of course.\r\n","created_at":"2015-11-02T22:45:35Z","updated_at":"2015-11-02T22:45:35Z","html_url":"https://github.com/mobile-shell/mosh/pull/690#discussion_r43694776","pull_request_url":"https://api.github.com/repos/mobile-shell/mosh/pulls/690","_links":{"self":{"href":"https://api.github.com/repos/mobile-shell/mosh/pulls/comments/43694776"},"html":{"href":"https://github.com/mobile-shell/mosh/pull/690#discussion_r43694776"},"pull_request":{"href":"https://api.github.com/repos/mobile-shell/mosh/pulls/690"}}},"pull_request":{"url":"https://api.github.com/repos/mobile-shell/mosh/pulls/690","id":49492674,"html_url":"https://github.com/mobile-shell/mosh/pull/690","diff_url":"https://github.com/mobile-shell/mosh/pull/690.diff","patch_url":"https://github.com/mobile-shell/mosh/pull/690.patch","issue_url":"https://api.github.com/repos/mobile-shell/mosh/issues/690","number":690,"state":"open","locked":false,"title":"Server timeouts","user":{"login":"cgull","id":1934797,"avatar_url":"https://avatars.githubusercontent.com/u/1934797?v=3","gravatar_id":"","url":"https://api.github.com/users/cgull","html_url":"https://github.com/cgull","followers_url":"https://api.github.com/users/cgull/followers","following_url":"https://api.github.com/users/cgull/following{/other_user}","gists_url":"https://api.github.com/users/cgull/gists{/gist_id}","starred_url":"https://api.github.com/users/cgull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgull/subscriptions","organizations_url":"https://api.github.com/users/cgull/orgs","repos_url":"https://api.github.com/users/cgull/repos","events_url":"https://api.github.com/users/cgull/events{/privacy}","received_events_url":"https://api.github.com/users/cgull/received_events","type":"User","site_admin":false},"body":"I've had this sitting around a while.  Discussion on #12 is making me post it now...\r\n\r\nThis adds environment variables to optionally control session timeout/termination behavior on mosh-server.\r\n\r\n* `MOSH_SERVER_NETWORK_TMOUT` controls how long mosh-server will wait after last hearing traffic before exiting.\r\n* `MOSH_SERVER_SIGNAL_TMOUT` controls how long mosh-server will wait after last hearing traffic before allowing SIGUSR1 to be effective.\r\n\r\n`MOSH_SERVER_NETWORK_TMOUT` is pretty straightforward and obvious.  `MOSH_SERVER_SIGNAL_TMOUT` is less so.  The objective there is to allow simple scripts to kill off network-idle sessions without risk of killing sessions that do have connectivity.  I'm not sure how much this is needed and how easy it is for people to grasp and use.  I could drop that part entirely, or tie the SIGUSR1 functionality to MOSH_SERVER_NETWORK_TMOUT instead.\r\n","created_at":"2015-11-02T22:06:56Z","updated_at":"2015-11-02T22:45:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e6e6edf686ad377ce5587a318ddc9cef589a4686","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mobile-shell/mosh/pulls/690/commits","review_comments_url":"https://api.github.com/repos/mobile-shell/mosh/pulls/690/comments","review_comment_url":"https://api.github.com/repos/mobile-shell/mosh/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mobile-shell/mosh/issues/690/comments","statuses_url":"https://api.github.com/repos/mobile-shell/mosh/statuses/2743427d2a5c114759fdc296147ac4dac2f85d57","head":{"label":"cgull:server-timeouts","ref":"server-timeouts","sha":"2743427d2a5c114759fdc296147ac4dac2f85d57","user":{"login":"cgull","id":1934797,"avatar_url":"https://avatars.githubusercontent.com/u/1934797?v=3","gravatar_id":"","url":"https://api.github.com/users/cgull","html_url":"https://github.com/cgull","followers_url":"https://api.github.com/users/cgull/followers","following_url":"https://api.github.com/users/cgull/following{/other_user}","gists_url":"https://api.github.com/users/cgull/gists{/gist_id}","starred_url":"https://api.github.com/users/cgull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgull/subscriptions","organizations_url":"https://api.github.com/users/cgull/orgs","repos_url":"https://api.github.com/users/cgull/repos","events_url":"https://api.github.com/users/cgull/events{/privacy}","received_events_url":"https://api.github.com/users/cgull/received_events","type":"User","site_admin":false},"repo":{"id":15034199,"name":"mosh","full_name":"cgull/mosh","owner":{"login":"cgull","id":1934797,"avatar_url":"https://avatars.githubusercontent.com/u/1934797?v=3","gravatar_id":"","url":"https://api.github.com/users/cgull","html_url":"https://github.com/cgull","followers_url":"https://api.github.com/users/cgull/followers","following_url":"https://api.github.com/users/cgull/following{/other_user}","gists_url":"https://api.github.com/users/cgull/gists{/gist_id}","starred_url":"https://api.github.com/users/cgull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgull/subscriptions","organizations_url":"https://api.github.com/users/cgull/orgs","repos_url":"https://api.github.com/users/cgull/repos","events_url":"https://api.github.com/users/cgull/events{/privacy}","received_events_url":"https://api.github.com/users/cgull/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cgull/mosh","description":"Mobile Shell","fork":true,"url":"https://api.github.com/repos/cgull/mosh","forks_url":"https://api.github.com/repos/cgull/mosh/forks","keys_url":"https://api.github.com/repos/cgull/mosh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cgull/mosh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cgull/mosh/teams","hooks_url":"https://api.github.com/repos/cgull/mosh/hooks","issue_events_url":"https://api.github.com/repos/cgull/mosh/issues/events{/number}","events_url":"https://api.github.com/repos/cgull/mosh/events","assignees_url":"https://api.github.com/repos/cgull/mosh/assignees{/user}","branches_url":"https://api.github.com/repos/cgull/mosh/branches{/branch}","tags_url":"https://api.github.com/repos/cgull/mosh/tags","blobs_url":"https://api.github.com/repos/cgull/mosh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cgull/mosh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cgull/mosh/git/refs{/sha}","trees_url":"https://api.github.com/repos/cgull/mosh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cgull/mosh/statuses/{sha}","languages_url":"https://api.github.com/repos/cgull/mosh/languages","stargazers_url":"https://api.github.com/repos/cgull/mosh/stargazers","contributors_url":"https://api.github.com/repos/cgull/mosh/contributors","subscribers_url":"https://api.github.com/repos/cgull/mosh/subscribers","subscription_url":"https://api.github.com/repos/cgull/mosh/subscription","commits_url":"https://api.github.com/repos/cgull/mosh/commits{/sha}","git_commits_url":"https://api.github.com/repos/cgull/mosh/git/commits{/sha}","comments_url":"https://api.github.com/repos/cgull/mosh/comments{/number}","issue_comment_url":"https://api.github.com/repos/cgull/mosh/issues/comments{/number}","contents_url":"https://api.github.com/repos/cgull/mosh/contents/{+path}","compare_url":"https://api.github.com/repos/cgull/mosh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cgull/mosh/merges","archive_url":"https://api.github.com/repos/cgull/mosh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cgull/mosh/downloads","issues_url":"https://api.github.com/repos/cgull/mosh/issues{/number}","pulls_url":"https://api.github.com/repos/cgull/mosh/pulls{/number}","milestones_url":"https://api.github.com/repos/cgull/mosh/milestones{/number}","notifications_url":"https://api.github.com/repos/cgull/mosh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cgull/mosh/labels{/name}","releases_url":"https://api.github.com/repos/cgull/mosh/releases{/id}","created_at":"2013-12-09T00:16:14Z","updated_at":"2015-03-29T18:44:23Z","pushed_at":"2015-11-02T21:59:16Z","git_url":"git://github.com/cgull/mosh.git","ssh_url":"git@github.com:cgull/mosh.git","clone_url":"https://github.com/cgull/mosh.git","svn_url":"https://github.com/cgull/mosh","homepage":"http://mosh.mit.edu","size":3215,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"mobile-shell:master","ref":"master","sha":"4b8444988e8e8b8d244f8576cc013c90a91ab3f6","user":{"login":"mobile-shell","id":13547101,"avatar_url":"https://avatars.githubusercontent.com/u/13547101?v=3","gravatar_id":"","url":"https://api.github.com/users/mobile-shell","html_url":"https://github.com/mobile-shell","followers_url":"https://api.github.com/users/mobile-shell/followers","following_url":"https://api.github.com/users/mobile-shell/following{/other_user}","gists_url":"https://api.github.com/users/mobile-shell/gists{/gist_id}","starred_url":"https://api.github.com/users/mobile-shell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mobile-shell/subscriptions","organizations_url":"https://api.github.com/users/mobile-shell/orgs","repos_url":"https://api.github.com/users/mobile-shell/repos","events_url":"https://api.github.com/users/mobile-shell/events{/privacy}","received_events_url":"https://api.github.com/users/mobile-shell/received_events","type":"Organization","site_admin":false},"repo":{"id":1234783,"name":"mosh","full_name":"mobile-shell/mosh","owner":{"login":"mobile-shell","id":13547101,"avatar_url":"https://avatars.githubusercontent.com/u/13547101?v=3","gravatar_id":"","url":"https://api.github.com/users/mobile-shell","html_url":"https://github.com/mobile-shell","followers_url":"https://api.github.com/users/mobile-shell/followers","following_url":"https://api.github.com/users/mobile-shell/following{/other_user}","gists_url":"https://api.github.com/users/mobile-shell/gists{/gist_id}","starred_url":"https://api.github.com/users/mobile-shell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mobile-shell/subscriptions","organizations_url":"https://api.github.com/users/mobile-shell/orgs","repos_url":"https://api.github.com/users/mobile-shell/repos","events_url":"https://api.github.com/users/mobile-shell/events{/privacy}","received_events_url":"https://api.github.com/users/mobile-shell/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mobile-shell/mosh","description":"Mobile Shell","fork":false,"url":"https://api.github.com/repos/mobile-shell/mosh","forks_url":"https://api.github.com/repos/mobile-shell/mosh/forks","keys_url":"https://api.github.com/repos/mobile-shell/mosh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mobile-shell/mosh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mobile-shell/mosh/teams","hooks_url":"https://api.github.com/repos/mobile-shell/mosh/hooks","issue_events_url":"https://api.github.com/repos/mobile-shell/mosh/issues/events{/number}","events_url":"https://api.github.com/repos/mobile-shell/mosh/events","assignees_url":"https://api.github.com/repos/mobile-shell/mosh/assignees{/user}","branches_url":"https://api.github.com/repos/mobile-shell/mosh/branches{/branch}","tags_url":"https://api.github.com/repos/mobile-shell/mosh/tags","blobs_url":"https://api.github.com/repos/mobile-shell/mosh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mobile-shell/mosh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mobile-shell/mosh/git/refs{/sha}","trees_url":"https://api.github.com/repos/mobile-shell/mosh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mobile-shell/mosh/statuses/{sha}","languages_url":"https://api.github.com/repos/mobile-shell/mosh/languages","stargazers_url":"https://api.github.com/repos/mobile-shell/mosh/stargazers","contributors_url":"https://api.github.com/repos/mobile-shell/mosh/contributors","subscribers_url":"https://api.github.com/repos/mobile-shell/mosh/subscribers","subscription_url":"https://api.github.com/repos/mobile-shell/mosh/subscription","commits_url":"https://api.github.com/repos/mobile-shell/mosh/commits{/sha}","git_commits_url":"https://api.github.com/repos/mobile-shell/mosh/git/commits{/sha}","comments_url":"https://api.github.com/repos/mobile-shell/mosh/comments{/number}","issue_comment_url":"https://api.github.com/repos/mobile-shell/mosh/issues/comments{/number}","contents_url":"https://api.github.com/repos/mobile-shell/mosh/contents/{+path}","compare_url":"https://api.github.com/repos/mobile-shell/mosh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mobile-shell/mosh/merges","archive_url":"https://api.github.com/repos/mobile-shell/mosh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mobile-shell/mosh/downloads","issues_url":"https://api.github.com/repos/mobile-shell/mosh/issues{/number}","pulls_url":"https://api.github.com/repos/mobile-shell/mosh/pulls{/number}","milestones_url":"https://api.github.com/repos/mobile-shell/mosh/milestones{/number}","notifications_url":"https://api.github.com/repos/mobile-shell/mosh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mobile-shell/mosh/labels{/name}","releases_url":"https://api.github.com/repos/mobile-shell/mosh/releases{/id}","created_at":"2011-01-09T09:41:02Z","updated_at":"2015-11-02T21:31:22Z","pushed_at":"2015-11-02T22:06:57Z","git_url":"git://github.com/mobile-shell/mosh.git","ssh_url":"git@github.com:mobile-shell/mosh.git","clone_url":"https://github.com/mobile-shell/mosh.git","svn_url":"https://github.com/mobile-shell/mosh","homepage":"http://mosh.mit.edu","size":4738,"stargazers_count":4563,"watchers_count":4563,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":325,"mirror_url":null,"open_issues_count":155,"forks":325,"open_issues":155,"watchers":4563,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mobile-shell/mosh/pulls/690"},"html":{"href":"https://github.com/mobile-shell/mosh/pull/690"},"issue":{"href":"https://api.github.com/repos/mobile-shell/mosh/issues/690"},"comments":{"href":"https://api.github.com/repos/mobile-shell/mosh/issues/690/comments"},"review_comments":{"href":"https://api.github.com/repos/mobile-shell/mosh/pulls/690/comments"},"review_comment":{"href":"https://api.github.com/repos/mobile-shell/mosh/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mobile-shell/mosh/pulls/690/commits"},"statuses":{"href":"https://api.github.com/repos/mobile-shell/mosh/statuses/2743427d2a5c114759fdc296147ac4dac2f85d57"}}}}