aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os
Commit message (Collapse)AuthorAge
...
* | channels: reflect exit due to signals in exit status code (#10573)Daniel Hahler2019-08-09
| | | | | | | | | | Uses `128 + term_signal` in case of exit due to a signal. Fixes https://github.com/neovim/neovim/issues/10571.
* | f_environ: cleanup/refactorDaniel Hahler2019-08-06
| | | | | | | | | | - use os_getenvname_at_index / os_getenv - f_getenv: empty (*p == NUL) is not null (undefined)
* | vim-patch:8.1.0572: stopping a job does not work properly on OpenBSDDaniel Hahler2019-07-30
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Stopping a job does not work properly on OpenBSD. Solution: Do not use getpgid() to check the process group of the job processs ID, always pass the negative process ID to kill(). (George Koehler, closes vim/vim#3656) https://github.com/vim/vim/commit/76ab4fd61901090e6af3451ca6c5ca0fc370571f Ref: https://github.com/neovim/neovim/issues/9704 Ref: https://github.com/neovim/neovim/issues/10182#issuecomment-514450069 Closes https://github.com/neovim/neovim/pull/10660
* | os/fs: introduce os_fopen()Justin M. Keyes2019-07-25
| | | | | | | | | | | | | | Windows: Using fopen() directly may need UTF-16 filepath conversion. To achieve that, os_fopen() goes through os_open(). fix #10586
* | vim-patch:8.1.1740: exepath() doesn't work for "bin/cat" (#10556)Daniel Hahler2019-07-24
| | | | | | | | | | | | | | | | Problem: Exepath() doesn't work for "bin/cat". Solution: Check for any path separator. (Daniel Hahler, closes vim/vim#4724, closes vim/vim#4710) https://github.com/vim/vim/commit/d08b8c4c04db9433340df38d21f0e26878f28421 Fixes https://github.com/neovim/neovim/issues/10554.
* | env: invalid pointer after os_setenv() #10558erw72019-07-23
| |
* | os_can_exe: remove char_uJustin M. Keyes2019-07-21
| |
* | win: jobstart(), system(): $PATHEXT-resolve exeJustin M. Keyes2019-07-21
| | | | | | | | | | | | | | | | | | | | | | | | Windows: In order for jobstart(['foo']), system(['foo']) to find "foo.cmd", we must replace "foo" with "foo.cmd" before sending `argv` to process_spawn(). Rationale: jobstart([…]), system([…]) "executable" semantics should be consistent with the VimL executable() function. fix #9569 related: #10554
* | refactor: use int for Columns and RowsBjörn Linse2019-07-19
| |
* | Fix is_executable_in_path() on Windows (#10468)erw72019-07-15
| | | | | | | | | | | | | | | | * Fix problem that 1byte extra memory was allocated in is_executable_in_path * Revert "Revert "tests: executable_spec: enable pending test #10443" (#10454)" This reverts commit 13fbeda0e56db36aeeb865bb5b33d13f69b2fdbc.
* | viml/profile: revert gettimeofday() #10488Justin M. Keyes2019-07-13
| | | | | | | | | | | | | | e2ce5ff9d616 was proven to be bogus, so revert it. close #10328 ref #10356 ref #10452
* | viml/reltime(): allow negative result #10453Justin M. Keyes2019-07-09
| | | | | | | | | | | | - define proftime_T as signed integer - profile_sub(): allow negative result closes #10452
* | CI: improve gcov handling #10404Daniel Hahler2019-07-07
| | | | | | | | | | | | | | | | | | - Move __gcov_flush to process_spawn, for more reliable coverage tracking of subprocesses - Travis: use GCOV_ERROR_FILE - codecov: use "-X fix" to skip "fixing" uploaded coverage data; it should be handled by codecov's backend instead. - AppVeyor: no $PATH mangling, which breaks with the improved coverage tracking due to missing .dll in PATH.
* | win,fs.c: Fix is_executable_ext #10209erw72019-07-04
| | | | | | | | | | | | | | | | | | | | | | Fix issue that increment expression is executable and pointer ext pointing out of the buffer, if the pointer ext points to the terminating NUL. * Change termination condition judgment to one place * Change first condition judgment Change to not evaluate *(ext -1) in the first condition judgment. * Change to use copy_option_part instead of STRLCPY
* | fileio.c: eliminate set_file_time() #10357Justin M. Keyes2019-06-30
| | | | | | Introduce os_file_settime(), remove cruft.
* | viml/profile: switch to uv_gettimeofday() #10356Justin M. Keyes2019-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Performance of high-resolution time (clock_gettime via uv_hrtime) is expensive on some systems. For profiling VimL, syntax, etc., we don't care about nanosecond-precision and monotonicity edge-cases, so avoid uv_hrtime(). closes #10328 From the uv__hrtime() source: https://github.com/libuv/libuv/blob/0cdb4a5b4b706d0e09413d9270da28f9a88dc083/src/unix/linux-core.c#L442-L462 /* Prefer CLOCK_MONOTONIC_COARSE if available but only when it has * millisecond granularity or better. CLOCK_MONOTONIC_COARSE is * serviced entirely from the vDSO, whereas CLOCK_MONOTONIC may * decide to make a costly system call. */ This micro-benchmark (Debug build) shows negligible differences on my system: #include <sys/time.h> ... proftime_T tm = profile_start(); int trials = 999999; int64_t t = 0; struct timeval tv; for (int i = 0; i < trials; i++) { t += gettimeofday(&tv,NULL); } tm = profile_end(tm); ILOG("%d trials of gettimeofday: %s", trials, profile_msg(tm)); tm = profile_start(); for (int i = 0; i < trials; i++) { t += os_hrtime(); } tm = profile_end(tm); ILOG("%d trials of os_hrtime: %s", trials, profile_msg(tm)); tm = profile_start(); for (int i = 0; i < trials; i++) { t += os_utime(); } tm = profile_end(tm); ILOG("%d trials of os_utime: %s", trials, profile_msg(tm)); ILOG("%zu", t);
* | os: close library even if uv_dlopen() failserw72019-06-23
| |
* | gcov: use __gcov_flush instead of __gcov_dump (#10260)Daniel Hahler2019-06-18
| | | | | | | | | | | | This restores missing coverage again. Move it to process_spawn in os/pty_process_unix.c, since it seems to break printargs-test on Windows/AppVeyor otherwise (#10248).
* | TUI: set os/input.c:global_fd to input->in_fd #10174erw72019-06-10
|/ | | | | | | | | | | | | Problem: When we changed startup to wait for the TUI (like a remote UI), we forgot to set os/input.c:global_fd. That used to be done by input_start(). Solution: Initialize os/input.c:global_fd before initializing libtermkey (termkey_new_abstract) so that tui_get_stty_erase() and friends can inspect the correct fd. fixes #10134 close #10174
* vim-patch:8.1.0211: expanding a file name "~" results in $HOMEJan Edmund Lazo2019-05-25
| | | | | | Problem: Expanding a file name "~" results in $HOME. (Aidan Shafran) Solution: Change "~" to "./~" before expanding. (closes vim/vim#3072) https://github.com/vim/vim/commit/00136dc321586800986e8f743c2f108f5eecbf92
* lua/shared: share trim() implJustin M. Keyes2019-05-20
|
* fileio: set group of backup fileJustin M. Keyes2019-05-20
| | | | | | | | | | Restores code removed in #9709. uv_fs_copyfile() copies the perm bits but not the group name. https://github.com/libuv/libuv/pull/1547 ref #9709 ref #8288
* Merge #9709 'fileio: use os_copy to create backups'Justin M. Keyes2019-05-20
|\ | | | | | | ref #8288
| * docs: explicitly state return value on successSaid Al Attrach2019-03-30
| |
| * fs: add os_copy function that uses uv_fs_copyfileSaid Al Attrach2019-03-10
| |
* | vim-patch:8.1.1231: asking about existing swap file unnecessarilyJustin M. Keyes2019-04-29
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Asking about existing swap file unnecessarily. Solution: When it is safe, delete the swap file. Remove HAS_SWAP_EXISTS_ACTION, it is always defined. (closes vim/vim#1237) https://github.com/vim/vim/commit/67cf86bfff5fd5224d557d81cb146f46e33b831c N/A: vim-patch:8.1.1232 vim-patch:8.1.1233 vim-patch:8.1.1236
* | win/defaults: Use "…/nvim-data/site" in 'runtimepath'Justin M. Keyes2019-04-28
| | | | | | | | | | | | | | | | | | | | On Windows we store non-config data in "$XDG_DATA_HOME/nvim-data". But the "…/site" items in 'runtimepath' did not correctly point to that location, they used "…/nvim/site". Fix the init logic to use "…/nvim-data/site". closes #9910
* | test: "$PATHEXT=::"Justin M. Keyes2019-04-02
| |
* | fs.c: fix is_executable_ext()erw72019-04-02
| | | | | | | | | | | | | | - Corresponds to the case where pathext contains a zero-length extension. - Remove unnecessary break statements. - Fix function attributes.
* | [ci skip] fs.c: fix commenterw72019-04-01
| |
* | fs.c: Move sh check of is_executable_ext to outside of looperw72019-04-01
| |
* | fs.c: Simplify calling is_executable_exterw72019-04-01
| |
* | fs.c: fix is_executable_exterw72019-04-01
| | | | | | | | | | | | - Fix the problem of checking the extension in a UNIX like shell. - Fix the problem of not checking the existence of the file when the pathext contains an extension.
* | fs.c: eliminate is_extension_executableJustin M. Keyes2019-04-01
| | | | | | | | Add this functionality to is_executable_ext() instead.
* | is_extension_executable: simplify check for unix-style shellJustin M. Keyes2019-04-01
| | | | | | | | mch_expand_wildcards does it this way, it's probably good enough.
* | is_extension_executable: simplifyerw72019-04-01
| | | | | | | | Simplify method of determining search position of the extension.
* | cleanup: PATHEXT functionerw72019-04-01
| |
* | test/win: executable(), exepath() #9516erw72019-04-01
| |
* | win: exepath(): append extension if omittederw72019-04-01
| | | | | | | | fixes #9403
* | win: executable(): also check extensionerw72019-04-01
| |
* | win: executable(): fix relative path bugerw72019-04-01
| | | | | | | | | | Qualified (i.e. dot-prefixed) relative paths should only search CWD, not $PATH.
* | Merge #9686 'win/Lua: monkey-patch os.getenv()'Justin M. Keyes2019-03-16
|\ \ | |/ |/| | | fixes #9681
| * Fix os.getenv of lua on Windowserw72019-03-07
| | | | | | | | | | Change to use os_getenv instead of getenv because environment variable set by uv_os_setenv can not be get with getenv.
| * Fix environment variable on Windowserw72019-03-06
| | | | | | | | | | | | | | Since uv_os_setenv uses SetEnvironmentVariableW, _wenviron is no updated. As a result, inconsistency occurs in completion of environment variable names. Change to use GetEnvironmentStaringsW instead of _wenviron to solve it.
* | executable(): return false if user is not owner #9703erw72019-03-09
|/ | | | | | | | | | S_IXUSR does not check ownership. Test case: touch test.txt chmod 744 test.txt sudo chown root:root test.txt nvim -u NORC :echo executable('./test.txt')
* os/env: Fix completion of multibyte env var nameserw72019-03-03
| | | | fixes #9655
* floats: implement floating windowsBjörn Linse2019-03-02
| | | | Co-Author: Dongdong Zhou <dzhou121@gmail.com>
* os: remove uv_translate_sys_error impl #9652Justin M. Keyes2019-03-01
| | | Since libuv minimum version is now v1.12, we can use libuv's impl.
* clint: check env functionsJustin M. Keyes2019-02-28
|
* os/env: use libuv v1.12 getenv/setenv APIJustin M. Keyes2019-02-27
| | | | | | | | | | | - Minimum required libuv is now v1.12 - Because `uv_os_getenv` requires allocating, we must manage a map (`envmap` in `env.c`) to maintain the old behavior of `os_getenv` . - free() map-items after removal. khash.h does not make copies of anything, so even its keys must be memory-managed by the caller. closes #8398 closes #9267