* lread.c: Fix file descriptor leaks and errno issues.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 17 Jul 2013 17:24:54 +0000 (10:24 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 17 Jul 2013 17:24:54 +0000 (10:24 -0700)
commita0931322f6c257bb4a4a678f62dcb4ae3b253221
tree2c597df44098b26fb66026354ef17738ee922635
parent5dc8a629877b040a5dd5904815ed885949614948
* lread.c: Fix file descriptor leaks and errno issues.

(Fload): Close some races that leaked fds or streams when 'load'
was interrupted.
(Fload, openp): Report error number of last nontrivial failure to open.
ENOENT counts as trivial.
* eval.c (do_nothing, clear_unwind_protect, set_unwind_protect_ptr):
New functions.
* fileio.c (close_file_unwind): No need to test whether FD is nonnegative,
now that the function is always called with a nonnegative arg.
* lisp.h (set_unwind_protect_ptr, set_unwind_protect_int): Remove.
All uses replaced with ...
(clear_unwind_protect, set_unwind_protect_ptr): New decls.
src/ChangeLog
src/editfns.c
src/eval.c
src/fileio.c
src/lisp.h
src/lread.c