diff options
| author | Paul Eggert | 2013-07-09 00:04:48 -0700 |
|---|---|---|
| committer | Paul Eggert | 2013-07-09 00:04:48 -0700 |
| commit | 4ebbdd6712c1966406b40d2673464949775cbd7a (patch) | |
| tree | 08667dd241629ca55c2c30ce19777bd7ec107cfa /src/lisp.h | |
| parent | 584ee3fc72260acb3cc83f4d1a047b733a08ca17 (diff) | |
| download | emacs-4ebbdd6712c1966406b40d2673464949775cbd7a.tar.gz emacs-4ebbdd6712c1966406b40d2673464949775cbd7a.zip | |
Handle errno and exit status a bit more carefully.
* lib/ignore-value.h: Remove this gnulib-imported file.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* admin/merge-gnulib (GNULIB_MODULES): Remove ignore-value.
* src/callproc.c (child_setup) [!DOS_NT]: Don't try to stuff an error
number into an exit status. Instead, use EXIT_CANCELED.
(child_setup) [!MSDOS]: Avoid possible deadlock with vfork.
* src/callproc.c (relocate_fd):
* src/emacs.c (close_output_streams, main):
* src/process.c (create_process):
* src/sysdep.c (sys_subshell) [!DOS_NT || !WINDOWSNT]:
Use emacs_perror for simplicity.
* src/callproc.c (relocate_fd, main):
* src/sysdep.c (sys_subshell):
Exit with EXIT_CANCELED etc., not 1, when exec setup fails.
(shut_down_emacs): Use emacs_write, not write.
* src/emacs.c, src/sysdep.c: Don't include <ignore-value.h>.
* src/fileio.c (Fcopy_file, e_write):
* src/nsterm.m (ns_select):
* src/process.c (send_process):
* src/sound.c (vox_write):
Use emacs_write_sig, not emacs_write.
* src/lisp.h (emacs_write_sig, emacs_perror): New decls.
* src/process.h (EXIT_CANCELED), EXIT_CANNOT_INVOKE, EXIT_ENOENT):
New constants.
* src/sysdep.c (emacs_backtrace): Use emacs_write, not ignore_value
of write.
(emacs_full_write): New function.
(emacs_write): Rewrite to use it.
(emacswrite_sig, emacs_perror): New functions.
* src/xrdb.c (fatal): Don't invoke perror, since errno might be garbage.
Diffstat (limited to 'src/lisp.h')
| -rw-r--r-- | src/lisp.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lisp.h b/src/lisp.h index c7e36fbf9de..33e9309de34 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -3998,6 +3998,7 @@ extern void init_process_emacs (void); | |||
| 3998 | extern void syms_of_process (void); | 3998 | extern void syms_of_process (void); |
| 3999 | extern void setup_process_coding_systems (Lisp_Object); | 3999 | extern void setup_process_coding_systems (Lisp_Object); |
| 4000 | 4000 | ||
| 4001 | /* Defined in callproc.c. */ | ||
| 4001 | #ifndef DOS_NT | 4002 | #ifndef DOS_NT |
| 4002 | _Noreturn | 4003 | _Noreturn |
| 4003 | #endif | 4004 | #endif |
| @@ -4090,6 +4091,8 @@ extern int emacs_open (const char *, int, int); | |||
| 4090 | extern int emacs_close (int); | 4091 | extern int emacs_close (int); |
| 4091 | extern ptrdiff_t emacs_read (int, char *, ptrdiff_t); | 4092 | extern ptrdiff_t emacs_read (int, char *, ptrdiff_t); |
| 4092 | extern ptrdiff_t emacs_write (int, const char *, ptrdiff_t); | 4093 | extern ptrdiff_t emacs_write (int, const char *, ptrdiff_t); |
| 4094 | extern ptrdiff_t emacs_write_sig (int, char const *, ptrdiff_t); | ||
| 4095 | extern void emacs_perror (char const *); | ||
| 4093 | 4096 | ||
| 4094 | extern void unlock_all_files (void); | 4097 | extern void unlock_all_files (void); |
| 4095 | extern void lock_file (Lisp_Object); | 4098 | extern void lock_file (Lisp_Object); |