ZyX
c49e22d396
Merge branch 'master' into s-dash-stdin
2017-12-03 16:49:30 +03:00
ZyX
7109f63e3c
main: Flush file in place of closing it, also do error reporting
...
Apparently on travis OS X systems it crashes when cleaning up streams with
stdout closed:
(lldb) bt all
* thread #1 : tid = 0x0000, 0x00007fff8703df06 libsystem_kernel.dylib`__pthread_kill + 10, stop reason = signal SIGSTOP
* frame #0 : 0x00007fff8703df06 libsystem_kernel.dylib`__pthread_kill + 10
frame #1 : 0x00007fff93a764ec libsystem_pthread.dylib`pthread_kill + 90
frame #2 : 0x00007fff97c056df libsystem_c.dylib`abort + 129
frame #3 : 0x00007fff97bccdd8 libsystem_c.dylib`__assert_rtn + 321
frame #4 : 0x0000000107a4e106 nvim`uv__close(fd=<unavailable>) + 102 at core.c:521
frame #5 : 0x0000000107a5307d nvim`uv__loop_close(loop=0x00007fff5847c018) + 77 at loop.c:118
frame #6 : 0x0000000107a4d149 nvim`uv_loop_close(loop=0x00007fff5847c018) + 57 at uv-common.c:626
frame #7 : 0x000000010783e5bc nvim`stream_set_blocking(fd=0, blocking=true) + 204 at stream.c:34
frame #8 : 0x000000010795d66b nvim`mch_exit(r=0) + 91 at os_unix.c:147
frame #9 : 0x00000001078d5663 nvim`command_line_scan(parmp=0x00007fff5847c760) + 1779 at main.c:787
frame #10 : 0x00000001078d4393 nvim`main(argc=2, argv=0x00007fff5847c898) + 163 at main.c:249
frame #11 : 0x00007fff8cdd65ad libdyld.dylib`start + 1
frame #12 : 0x00007fff8cdd65ad libdyld.dylib`start + 1
2017-07-04 19:58:02 +03:00
ZyX
72b3fd9664
os/fileio: Add ability to use os/fileio.c for file descriptors
...
Code imported from #6299
2017-07-04 18:37:01 +03:00
ZyX
5ab9e9f617
os/fileio: Add msgpack_file_write function
2017-07-04 18:37:01 +03:00
ZyX
c2f3e361c5
*: Add comment to all C files
2017-04-19 19:11:50 +03:00
ZyX
dc523eed8e
fileio: Silence “!= identical subexpressions” warning
2017-04-16 20:59:58 +03:00
ZyX
0dddd8a27c
os/fileio: Remove FUNC_ATTR_MALLOC for file_open_new
...
fp contains pointer to rbuffer
2017-04-15 19:13:43 +03:00
ZyX
b10880dadc
eval: Make writefile() able to disable fsync()
2017-04-02 22:11:35 +03:00
ZyX
cc4523013f
eval,fileio: Omit additional fsync() call
...
Fixes #6420
2017-04-01 21:15:13 +03:00
ZyX
83b39a4a02
os/fileio: Fix QB failure
2017-03-19 18:24:20 +03:00
ZyX
e78e75d85d
fileio,main: Do not restart syscall at EAGAIN when reading for -s
2017-03-19 17:29:48 +03:00
ZyX
bd798a3267
getchar: Use fileio instead of fdopen
...
Problem: as fileio is cached and reads blocks this is going to wait
until either EOF or reading enough characters to fill rbuffer. This is
not good when reading user input from stdin as script.
2017-03-19 16:56:00 +03:00
ZyX
222d98310a
os/fileio: Support appending to a file
2017-02-14 01:10:05 +03:00
ZyX
85e1a56560
os/fileio: Allow certain failures during file_fsync
...
According to the documentation fsync() may fail with EROFS or EINVAL if “file
descriptor is bound to a special file which does not support synchronization”
(e.g. /dev/stderr). This condition is completely valid in this case since main
point of `file_fsync()` is dumping buffered input.
2017-02-14 01:09:59 +03:00
Rui Abreu Ferreira
c168dc32b9
Remove redundant includes of unistd.h ( #5126 )
2016-07-29 08:53:01 -04:00
ZyX
96a57e1bc6
os/fileio: Use readv often
2016-06-24 01:07:09 +03:00
ZyX
2dd154457c
file: Move src/nvim/file.* to src/nvim/os/fileio.*
2016-06-24 00:07:55 +03:00