{"action":"closed","issue":{"url":"https://api.github.com/repos/neovim/neovim/issues/2388","labels_url":"https://api.github.com/repos/neovim/neovim/issues/2388/labels{/name}","comments_url":"https://api.github.com/repos/neovim/neovim/issues/2388/comments","events_url":"https://api.github.com/repos/neovim/neovim/issues/2388/events","html_url":"https://github.com/neovim/neovim/issues/2388","id":67326520,"number":2388,"title":"Enhance jobsend() ?  send EOF to the stdin of the process.","user":{"login":"syswow","id":10815286,"avatar_url":"https://avatars.githubusercontent.com/u/10815286?v=3","gravatar_id":"","url":"https://api.github.com/users/syswow","html_url":"https://github.com/syswow","followers_url":"https://api.github.com/users/syswow/followers","following_url":"https://api.github.com/users/syswow/following{/other_user}","gists_url":"https://api.github.com/users/syswow/gists{/gist_id}","starred_url":"https://api.github.com/users/syswow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syswow/subscriptions","organizations_url":"https://api.github.com/users/syswow/orgs","repos_url":"https://api.github.com/users/syswow/repos","events_url":"https://api.github.com/users/syswow/events{/privacy}","received_events_url":"https://api.github.com/users/syswow/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-09T10:05:17Z","updated_at":"2015-04-09T10:25:27Z","closed_at":"2015-04-09T10:25:27Z","body":"Hi, \r\nIf we run `clang -cc1 -fsyntax-only -code-completion-at -:1:1 ` in terminal, to end input , we have to press `ctrl+d` to send EOF to clang.\r\n\r\nlet's try to use `jobstart()`, `jobsend()`.\r\nshort example:\r\n```viml\r\nfunction s:JobHandler(job_id, data, event)\r\n  if a:event == 'stdout'\r\n    let str = 'stdout: '.join(a:data)\r\n  elseif a:event == 'stderr'\r\n    let str = 'stderr: '.join(a:data)\r\n  else\r\n    let str = 'exited'\r\n  endif\r\n  call append(line('$'), str)\r\nendfunction\r\nlet s:callbacks = {\r\n\\ 'on_stdout': function('s:JobHandler'),\r\n\\ 'on_stderr': function('s:JobHandler'),\r\n\\ 'on_exit': function('s:JobHandler')\r\n\\ }\r\nlet src = [\"#include <\", \"\\<cr>\"]\r\nlet argv = ['clang', '-cc1', '-fsyntax-only', '-code-completion-at', '-:1:1']\r\nlet id = jobstart(argv, s:callbacks)\r\nlet sendret = jobsend(id, src)\r\ncall append(line('$'), \"jobsend() ret: \".sendret)\r\n```\r\noutput:\r\n```\r\n\r\njobsend() ret:  1\r\n```\r\n it seems jobsend() cannot send EOF to clang, clang still wait more data from itself stdin.\r\n\r\nDo I understand this correctly?"}}