diff options
| author | Paul Eggert <eggert@cs.ucla.edu> | 2013-07-07 00:28:29 -0700 |
|---|---|---|
| committer | Paul Eggert <eggert@cs.ucla.edu> | 2013-07-07 00:28:29 -0700 |
| commit | 5f86adcd2c79e58c6ceeb30fb26c44e830b26a3e (patch) | |
| tree | 594eecc4b1ef2e57230f67136801fcdfb2347b82 /src/callproc.c | |
| parent | 6ed7a66a3f8781f66fce33f326ac2c5057de4c97 (diff) | |
| download | emacs-5f86adcd2c79e58c6ceeb30fb26c44e830b26a3e.tar.gz | |
Fix openp errno handling.
* callproc.c (Fcall_process): Preserve openp errno around close.
* lread.c (openp): Set errno when returning -1, as some callers
expect this.
Diffstat (limited to 'src/callproc.c')
| -rw-r--r-- | src/callproc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/callproc.c b/src/callproc.c index 6de8113dc14..185dc9a493e 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -436,7 +436,9 @@ usage: (call-process PROGRAM &optional INFILE DESTINATION DISPLAY &rest ARGS) * } if (NILP (path)) { + int openp_errno = errno; emacs_close (filefd); + errno = openp_errno; report_file_error ("Searching for program", Fcons (args[0], Qnil)); } |
