Skip to content

can not get stdout when io is running #431

Description

@wsdjeg

same issue as neovim/neovim#1592

as the NOTE of neovim's job saied:

  Note: Buffered stdout/stderr data which has not been flushed by the sender
  will not trigger the on_stdout/on_stderr callback (but if the process
  ends, the on_exit callback will be invoked).
        For example, "ruby -e" buffers output, so small strings will be
        buffered unless "auto-flushing" ($stdout.sync=true) is enabled. >
          function! Receive(job_id, data, event)
            echom printf('%s: %s',a:event,string(a:data))
          endfunction
          call jobstart(['ruby', '-e',
            \ '$stdout.sync = true; 5.times do sleep 1 and puts "Hello Ruby!" end'],
            \ {'on_stdout': 'Receive'})

how about enable autoflush in io?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working as intendedneeds reproNeeds reproduction on current code

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions