{"action":"created","issue":{"url":"https://api.github.com/repos/neovim/neovim/issues/9107","repository_url":"https://api.github.com/repos/neovim/neovim","labels_url":"https://api.github.com/repos/neovim/neovim/issues/9107/labels{/name}","comments_url":"https://api.github.com/repos/neovim/neovim/issues/9107/comments","events_url":"https://api.github.com/repos/neovim/neovim/issues/9107/events","html_url":"https://github.com/neovim/neovim/issues/9107","id":369136687,"node_id":"MDU6SXNzdWUzNjkxMzY2ODc=","number":9107,"title":"jobs: using pty=1 will not close stdin/exit job","user":{"login":"blueyed","id":9766,"node_id":"MDQ6VXNlcjk3NjY=","avatar_url":"https://avatars1.githubusercontent.com/u/9766?v=4","gravatar_id":"","url":"https://api.github.com/users/blueyed","html_url":"https://github.com/blueyed","followers_url":"https://api.github.com/users/blueyed/followers","following_url":"https://api.github.com/users/blueyed/following{/other_user}","gists_url":"https://api.github.com/users/blueyed/gists{/gist_id}","starred_url":"https://api.github.com/users/blueyed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blueyed/subscriptions","organizations_url":"https://api.github.com/users/blueyed/orgs","repos_url":"https://api.github.com/users/blueyed/repos","events_url":"https://api.github.com/users/blueyed/events{/privacy}","received_events_url":"https://api.github.com/users/blueyed/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-10-11T14:02:02Z","updated_at":"2018-10-11T14:57:34Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"```vim\r\nfunction! F(...) dict\r\n  echom string(a:000).', '.string(self)\r\n  echom string(s:opts)\r\nendfunction\r\n\r\nlet opts = {}\r\nlet opts.stdout_buffered = 1\r\nlet opts.stderr_buffered = 1\r\nlet opts.on_exit = function('F')\r\n\" let opts.on_stdout = function('F')\r\n\" let opts.on_stderr = function('F')\r\nlet opts.pty = 1\r\n\r\nlet s:opts = opts\r\n\r\nlet job = jobstart(['cat', '/dev/stdin'], opts)\r\n\" let job = jobstart(['echo', '/dev/stdin'], s:opts)\r\ncall jobsend(job, ['foo'])\r\ncall jobclose(job, 'stdin')\r\n```\r\n\r\nRunning this with `nvim -u t-dev-stdin-buffered.vim` will cause the job to not being closed/stopped.\r\n\r\nThe log says:\r\n\r\n> INFO  2018-10-11T15:56:16.756 28066 channel_create_event:208: new channel 3 (…/t-dev-stdin-buffered.vim:16) : {\"id\": 3, \"mode\": \"bytes\", \"stream\": \"job\", \"pty\": \"/dev/pts/25\"}\r\n> INFO  2018-10-11T15:56:16.824 28066 main:590: starting main loop\r\n\r\nCalling `jobstop(job)` then says:\r\n> INFO  2018-10-11T15:56:57.007 28066 on_process_exit:385: exited: pid=28067 status=1 stoptime=0\r\n\r\nNVIM v0.3.2-671-g384770556"},"comment":{"url":"https://api.github.com/repos/neovim/neovim/issues/comments/428987725","html_url":"https://github.com/neovim/neovim/issues/9107#issuecomment-428987725","issue_url":"https://api.github.com/repos/neovim/neovim/issues/9107","id":428987725,"node_id":"MDEyOklzc3VlQ29tbWVudDQyODk4NzcyNQ==","user":{"login":"bfredl","id":1363104,"node_id":"MDQ6VXNlcjEzNjMxMDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1363104?v=4","gravatar_id":"","url":"https://api.github.com/users/bfredl","html_url":"https://github.com/bfredl","followers_url":"https://api.github.com/users/bfredl/followers","following_url":"https://api.github.com/users/bfredl/following{/other_user}","gists_url":"https://api.github.com/users/bfredl/gists{/gist_id}","starred_url":"https://api.github.com/users/bfredl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfredl/subscriptions","organizations_url":"https://api.github.com/users/bfredl/orgs","repos_url":"https://api.github.com/users/bfredl/repos","events_url":"https://api.github.com/users/bfredl/events{/privacy}","received_events_url":"https://api.github.com/users/bfredl/received_events","type":"User","site_admin":false},"created_at":"2018-10-11T14:57:34Z","updated_at":"2018-10-11T14:57:34Z","author_association":"MEMBER","body":"Pty means stdin and stdout is the same fd. Use ctrl-d `\\x04` to signal end of input to the child process. "}}
{"actor":{"display_login":"bfredl"}}