aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/event/rstream.c
Commit message (Collapse)AuthorAge
* build: allow IWYU to fix includes for all .c filesdundargoc2022-11-15
| | | | | | | | | | Allow Include What You Use to remove unnecessary includes and only include what is necessary. This helps with reducing compilation times and makes it easier to visualise which dependencies are actually required. Work on https://github.com/neovim/neovim/issues/549, but doesn't close it since this only works fully for .c files and not headers.
* refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)dundargoc2022-05-25
|
* refactor: convert function comments to doxygen format (#17710)dundargoc2022-03-24
|
* refactor(uncrustify): format all c filesDundar Göc2022-03-10
|
* refactor(misc1): move out high-level input functions to a new file: input.cBjörn Linse2021-12-10
| | | | | Possibly dialog code is messages.c could be moved here as well. misc1.c is now empty, so delete it.
* refactor(misc1): move preserve_exit() to related functions in main.cBjörn Linse2021-12-09
|
* refactor: format files with uncrustify #15663dundargoc2021-09-14
|
* build: fix some warningsJustin M. Keyes2019-06-03
| | | | | | | | | | | | | | | | | | ../src/nvim/event/rstream.c:119:44: warning: format specifies type 'void *' but the argument has type 'Stream *' (aka 'struct stream *') [-Wformat-pedantic] DLOG("Closing Stream (%p): %s (%s)", stream, ~~ ^~~~~~ ../src/nvim/event/stream.c:95:30: warning: format specifies type 'void *' but the argument has type 'Stream *' (aka 'struct stream *') [-Wformat-pedantic] DLOG("closing Stream: %p", stream); ~~ ^~~~~~ ../src/nvim/msgpack_rpc/channel.c:71:72: warning: format specifies type 'void *' but the argument has type 'Stream *' (aka 'struct stream *') [-Wformat-pedantic] DLOG("rpc ch %" PRIu64 " in-stream=%p out-stream=%p", channel->id, in, out); ~~ ^~ ../src/nvim/msgpack_rpc/channel.c:71:76: warning: format specifies type 'void *' but the argument has type 'Stream *' (aka 'struct stream *') [-Wformat-pedantic] DLOG("rpc ch %" PRIu64 " in-stream=%p out-stream=%p", channel->id, in, out); ~~ ^~~ ../src/nvim/msgpack_rpc/channel.c:226:28: warning: format specifies type 'void *' but the argument has type 'Stream *' (aka 'struct stream *') [-Wformat-pedantic] channel->id, count, stream); ^~~~~~
* win: stream_init() issue with tty on Windows #9884erw72019-04-28
| | | ref #9825
* lintJustin M. Keyes2018-06-04
|
* Fix warning when assing size_t type value to uv_buf_t.len, convert type to ↵George Zhao2018-01-18
| | | | ULONG on Windows.
* channels: allow bytes sockets and stdio, and buffered bytes outputBjörn Linse2017-11-24
|
* log: some DEBUG-level stream loggingJustin M. Keyes2017-08-21
|
* *: Add comment to all C filesZyX2017-04-19
|
* *: Fix some Windows-specific warningsZyX2017-03-29
| | | | Also fixed an error in path_fnamecmp().
* system('foo &', 'bar'): Show error, don't crash.Justin M. Keyes2016-10-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes #3529 Closes #5241 In Vim, :echo system('cat - &', 'foo') works because for both system() and :! Vim writes input to a temp file and uses shell syntax to redirect the file to the backgrounded `cat` (get_cmd_output() .. make_filter_cmd()). In Nvim, :echo system('cat - &', 'foo') fails because we write the input directly via pipes (shell.c:do_os_system()), but (per POSIX[1]) backgrounded process input stream is redirected from /dev/null (unless overridden by shell redirection; supported only by some shells [2]), so our writes are ignored, the process exits quickly, and if we are writing data larger than the buffer size we'll see EPIPE. This still works: :%w !tee > foo1358.txt & but this does not: :%w !tee foo1358.txt & though it *should* (why doesn't it?) because we still do the temp file dance in do_bang() .. do_filter(). [1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_03_02 [2] http://unix.stackexchange.com/a/71218
* stream: set data together with callbackBjörn Linse2016-08-20
|
* process.c: Prevent data loss for process output streamsoni-link2016-05-15
| | | | | For a terminating process, it's output streams could be closed, before all data is read.
* rstream.c: Prevent stream closing if a read event is still queued. #3172oni-link2015-08-16
| | | | | | | | Processing a stream's output can be queued. If stream_close() is called before the queue is processed, the RBuffer containing the stream's data is freed and the next read event would try to access freed memory. To fix this behavior, use the stream's pending requests counter.
* rstream: Pass read count to read eventsThiago de Arruda2015-08-13
| | | | This is necessary to keep events in the same order received from the OS.
* event: Refactor async event processingThiago de Arruda2015-08-13
| | | | | | | | | | - Improve the implementation of deferred/immediate events. - Use the new queue module to change how/when events are queued/processed by giving a private queue to each emitter. - Immediate events(which only exist to break uv_run recursion) are now represented in the `loop->fast_events` queue. - Events pushed to child queues are propagated to the event loop main queue and processed as K_EVENT keys.
* events: Add missing function attributes to some APIsThiago de Arruda2015-08-13
|
* rstream: Fix read_cb invocationThiago de Arruda2015-07-21
| | | | | | - Add missing call when the stream is a file - NULL check because it is possible to call rstream_start with the callback set to NULL.
* rstream/wstream: Unify structures and simplify APIThiago de Arruda2015-07-17
- Simplify RStream/WStream API and make it more consistent with libuv. - Move into the event loop layer(event subdirectory) - Remove uv_helpers module. - Simplify job/process internal modules/API. - Unify RStream and WStream into a single structure. This is necessary because libuv streams can be readable and writable at the same time(and because the uv_helpers.c hack to associate multiple streams with libuv handle was removed) - Make struct definition public, allowing more flexible/simple memory management by users of the module. - Adapt channel/job modules to cope with the changes.