{"action":"opened","issue":{"url":"https://api.github.com/repos/cloudius-systems/osv/issues/649","labels_url":"https://api.github.com/repos/cloudius-systems/osv/issues/649/labels{/name}","comments_url":"https://api.github.com/repos/cloudius-systems/osv/issues/649/comments","events_url":"https://api.github.com/repos/cloudius-systems/osv/issues/649/events","html_url":"https://github.com/cloudius-systems/osv/issues/649","id":99831807,"number":649,"title":"tty: support VEOF (control-D)","user":{"login":"nyh","id":584227,"avatar_url":"https://avatars.githubusercontent.com/u/584227?v=3","gravatar_id":"","url":"https://api.github.com/users/nyh","html_url":"https://github.com/nyh","followers_url":"https://api.github.com/users/nyh/followers","following_url":"https://api.github.com/users/nyh/following{/other_user}","gists_url":"https://api.github.com/users/nyh/gists{/gist_id}","starred_url":"https://api.github.com/users/nyh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyh/subscriptions","organizations_url":"https://api.github.com/users/nyh/orgs","repos_url":"https://api.github.com/users/nyh/repos","events_url":"https://api.github.com/users/nyh/events{/privacy}","received_events_url":"https://api.github.com/users/nyh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-08T20:27:32Z","updated_at":"2015-08-08T20:27:32Z","closed_at":null,"body":"When in ICANNON mode (non-raw), if the VEOF character is read it should generate an end-of-file from read, or as the termios(3) manual page clarifies:\r\n\r\n```\r\nMore precisely: this character causes the pending tty buffer to be sent to the waiting user program without waiting for end-of-line. If it is the first character of the line, the read(2) in the user program returns 0, which signifies end-of-file. \r\n```\r\n\r\nThe VEOF character defaults on Unix to the ASCII end-of-transmission character (EOT), \\004, i.e, control-D.\r\n\r\nThe fix to this belongs in drivers/line-discipline.cc."}}