| Commit message (Collapse) | Author | Age |
| |
|
| |
|
|
|
|
|
| |
Create mapping to most of the C spec and some POSIX specific functions.
This is more robust than relying files shipped with IWYU.
|
|
|
|
|
|
| |
This requires removing the "Inner expression should be aligned" rule
from clint as it prevents essentially any formatting regarding ternary
operators.
|
| |
|
|
|
|
|
|
|
| |
We already have an extensive suite of static analysis tools we use,
which causes a fair bit of redundancy as we get duplicate warnings. PVS
is also prone to give false warnings which creates a lot of work to
identify and disable.
|
|
|
| |
fix(startup): run embedded process with real path
|
|
|
| |
Also add the EXITFREE definition to main_lib rather than the nvim target, as the header generation needs the EXITFREE flag to work properly.
|
|
|
|
|
| |
Rename stdin/stdout in the server, so that RPC data won't get corrupted.
This also restores the use of stderr to write directly to the terminal.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Problem: Macros for MS-Windows are inconsistent, using "32", "3264 and
others.
Solution: Use MSWIN for all MS-Windows builds. Use FEAT_GUI_MSWIN for the
GUI build. (Hirohito Higashi, closes vim/vim#3932)
https://github.com/vim/vim/commit/4f97475d326c2773a78561fb874e4f23c25cbcd9
|
| |
|
|
|
|
| |
[skip ci]
|
|
|
|
|
|
|
|
|
|
| |
When starting a pty job, there are certain env vars that we need to
either add or remove. Currently, there are two relevant scenarios.
* Removing irrelevant env vars on Unix, mostly related to the terminal
hosting nvim since they do not apply to a libvterm-hosted terminal.
* Adding required env vars for Windows jobs.
|
|
|
|
| |
Co-authored-by: Matthieu Coudron <mattator@gmail.com>
|
|
|
|
|
|
|
| |
When UV_OVERLAPPED_PIPE was used for the pipe passed to the child process, a
problem occurred with the standard input of the .Net Framework application
(#11809). Therefore, add the overlapped option to jobstart() and change it so
that it is set only when necessary
|
|
|
|
| |
to modify the environment of the launched job.
|
|
|
|
|
| |
Uses `128 + term_signal` in case of exit due to a signal.
Fixes https://github.com/neovim/neovim/issues/10571.
|
|
|
| |
This will be used e.g. by the python client for native asyncio support
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
UV_PROCESS_DETACHED compels libuv:uv__process_child_init() to call
setsid() in the child just after fork(). That ensures the process and
its descendants are grouped in a separate session (and process group).
The following jobstart() call correctly groups `sh` and `sleep` in a new
session (and process-group), where `sh` is the "session leader" (and
process-group leader):
:call jobstart(['sh','-c','sleep 60'])
SESN PGRP PID PPID Command
30383 30383 30383 3620 │ ├─ -bash
30383 31432 31432 30383 │ │ └─ nvim -u NORC
30383 31432 31433 30383 │ │ ├─ nvim -u NORC
8105 8105 8105 31432 │ │ └─ sh -c sleep 60
8105 8105 8106 8105 │ │ └─ sleep 60
closes #6530
ref: https://stackoverflow.com/q/1046933
ref: https://unix.stackexchange.com/a/404065
Helped-by: Marco Hinz <mh.codebro+github@gmail.com>
Discussion
------------------------------------------------------------------------
On my linux box before this patch, the termclose_spec.lua:'kills job
trapping SIGTERM' test indirectly causes cmake/busted to wait for 60s.
That's because the test spawns a `sleep 60` descendant process which
hangs around even after nvim exits: nvim killed the parent PID, but not
PGID (process-group), so the grandchild "reparented" to init (PID 1).
Session contains processes (and process-groups) which are logically part
of the same "login session". Process-group is a set of
logically/informally-related processes within a session; for example,
shells assign a process group to each "job". Session IDs and PGIDs both
have type pid_t (like PIDs).
These OS-level mechanisms are, as usual, legacy accidents whose purpose
is upheld by convention and folklore. We can use session-level grouping
(setsid), or we could use process-group-level grouping (setpgid).
Vim uses setsid() if available, otherwise setpgid(0,0).
Windows
------------------------------------------------------------------------
UV_PROCESS_DETACHED on win32 sets CREATE_NEW_PROCESS_GROUP flag.
But uv_kill() does not kill the process-group:
https://github.com/nodejs/node/issues/3617
Ideas:
- Set UV_PROCESS_DETACHED (CREATE_NEW_PROCESS_GROUP), then call
GenerateConsoleCtrlEvent(CTRL_BREAK_EVENT, pid)
- Maybe won't work because MSDN says "Only processes that share the
same console as the calling process receive the signal."
https://docs.microsoft.com/en-us/windows/console/generateconsolectrlevent
But CREATE_NEW_PROCESS_GROUP creates a new console ...
ref https://stackoverflow.com/q/1453520
- Group processes within a "job". libuv does that *globally* for
non-detached processes: uv__init_global_job_handle.
- Iterate through CreateToolhelp32Snapshot().
- https://stackoverflow.com/q/1173342
- Vim does this, see terminate_all()
|
| |
|
|
|
|
|
|
|
| |
Doc for UV_PROCESS_DETACHED in uv.h mentions:
> child process will still keep the parent's event loop alive unless
> the parent process calls uv_unref() on the child's process handle.
ref #3944
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Disable CommandLineToArgvW-standard quoting for cmd.exe.
libuv assumes spawned processes follow the convention expected by
CommandLineToArgvW(). But cmd.exe is non-conformant, so for cmd.exe:
- With system([]), the caller has full control (and responsibility) to
quote arguments correctly.
- With system(''), shell* options are used.
libuv quoting is disabled if argv[0] is:
- cmd.exe
- cmd
- $COMSPEC resolving to a path with filename cmd.exe
Closes #6329
References #6387
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Closes #5360
References #3305
Reverts commit dc9652e68de163290abee880a74bf1727c715a1e.
Disabling the quoting was does not solve the problem in general, and
we would end up having to handle the quoting ourselves.
See: https://github.com/JuliaLang/julia/issues/13776
|
|
|
|
|
|
|
|
|
|
|
| |
Processes in vim are always started in the current directory, which
causes issues when the process is a daemon and the current directory is
a mountpoint. Fix this by adding an option to set the cwd of the new
process with jobstart(). In addition, fix termopen() so that it actually
uses the cwd option from the dict (it couldn't previously set the cwd
value due to dead code).
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
|
| |
|
|
|
|
|
|
| |
When calling uv_spawn to launch a process set the libuv process flag
UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS to disable escaping for the
arguments otherwise libuv will wrap arguments in quotes.
|
|
|