os_set_cloexec: Fix condition. #5986

Also: skip Test_undo_del_chars the right way. #6287
This commit is contained in:
Justin M. Keyes 2017-03-17 18:11:55 +01:00
parent 2ea7bfc627
commit 62e14d6565
2 changed files with 3 additions and 4 deletions

View File

@ -406,7 +406,7 @@ int os_set_cloexec(const int fd)
return -1;
}
if ((fdflags & FD_CLOEXEC) == 0
&& fcntl(fd, F_SETFD, fdflags | FD_CLOEXEC) < 0) {
&& fcntl(fd, F_SETFD, fdflags | FD_CLOEXEC) == -1) {
e = errno;
ELOG("Failed to set CLOEXEC on descriptor %d: %s", fd, strerror(e));
errno = e;

View File

@ -74,9 +74,8 @@ func BackOne(expected)
call assert_equal(a:expected, getline(1))
endfunc
" Test is disabled: Nvim does not support test_settime().
func Test_undo_del_chars_skipped()
return
func Test_undo_del_chars()
throw 'skipped: Nvim does not support test_settime()'
" Setup a buffer without creating undo entries
new