aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/shell.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2024-09-15 12:20:58 -0700
committerGitHub <noreply@github.com>2024-09-15 12:20:58 -0700
commit057d27a9d6ef0bb2ee5130704c45b9e9197e7c36 (patch)
treec08b0d80b543cc18dd1dec97dde9885b8a50b375 /src/nvim/os/shell.c
parent5792546777332361a9ac49107e46149c703de90e (diff)
downloadrneovim-057d27a9d6ef0bb2ee5130704c45b9e9197e7c36.tar.gz
rneovim-057d27a9d6ef0bb2ee5130704c45b9e9197e7c36.tar.bz2
rneovim-057d27a9d6ef0bb2ee5130704c45b9e9197e7c36.zip
refactor: rename "process" => "proc" #30387
Problem: - "process" is often used as a verb (`multiqueue_process_events`), which is ambiguous for cases where it's used as a topic. - The documented naming convention for processes is "proc". - `:help dev-name-common` - Shorter is better, when it doesn't harm readability or discoverability. Solution: Rename "process" => "proc" in all C symbols and module names.
Diffstat (limited to 'src/nvim/os/shell.c')
-rw-r--r--src/nvim/os/shell.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/os/shell.c b/src/nvim/os/shell.c
index 0b082c164d..a1ec9449df 100644
--- a/src/nvim/os/shell.c
+++ b/src/nvim/os/shell.c
@@ -14,10 +14,10 @@
#include "nvim/eval.h"
#include "nvim/eval/typval_defs.h"
#include "nvim/event/defs.h"
-#include "nvim/event/libuv_process.h"
+#include "nvim/event/libuv_proc.h"
#include "nvim/event/loop.h"
#include "nvim/event/multiqueue.h"
-#include "nvim/event/process.h"
+#include "nvim/event/proc.h"
#include "nvim/event/rstream.h"
#include "nvim/event/stream.h"
#include "nvim/event/wstream.h"
@@ -872,12 +872,12 @@ static int do_os_system(char **argv, const char *input, size_t len, char **outpu
char prog[MAXPATHL];
xstrlcpy(prog, argv[0], MAXPATHL);
- LibuvProcess uvproc = libuv_process_init(&main_loop, &buf);
- Process *proc = &uvproc.process;
+ LibuvProc uvproc = libuv_proc_init(&main_loop, &buf);
+ Proc *proc = &uvproc.proc;
MultiQueue *events = multiqueue_new_child(main_loop.events);
proc->events = events;
proc->argv = argv;
- int status = process_spawn(proc, has_input, true, true);
+ int status = proc_spawn(proc, has_input, true, true);
if (status) {
loop_poll_events(&main_loop, 0);
// Failed, probably 'shell' is not executable.
@@ -910,7 +910,7 @@ static int do_os_system(char **argv, const char *input, size_t len, char **outpu
if (!wstream_write(&proc->in, input_buffer)) {
// couldn't write, stop the process and tell the user about it
- process_stop(proc);
+ proc_stop(proc);
return -1;
}
// close the input stream after everything is written
@@ -927,7 +927,7 @@ static int do_os_system(char **argv, const char *input, size_t len, char **outpu
msg_no_more = true;
lines_left = -1;
}
- int exitcode = process_wait(proc, -1, NULL);
+ int exitcode = proc_wait(proc, -1, NULL);
if (!got_int && out_data_decide_throttle(0)) {
// Last chunk of output was skipped; display it now.
out_data_ring(NULL, SIZE_MAX);