aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.h
diff options
context:
space:
mode:
authorPaul Eggert2013-07-09 00:04:48 -0700
committerPaul Eggert2013-07-09 00:04:48 -0700
commit4ebbdd6712c1966406b40d2673464949775cbd7a (patch)
tree08667dd241629ca55c2c30ce19777bd7ec107cfa /src/process.h
parent584ee3fc72260acb3cc83f4d1a047b733a08ca17 (diff)
downloademacs-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/process.h')
-rw-r--r--src/process.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/process.h b/src/process.h
index e7ee5f9adde..8ae33aebf39 100644
--- a/src/process.h
+++ b/src/process.h
@@ -198,6 +198,14 @@ extern Lisp_Object QCspeed;
198extern Lisp_Object QCbytesize, QCstopbits, QCparity, Qodd, Qeven; 198extern Lisp_Object QCbytesize, QCstopbits, QCparity, Qodd, Qeven;
199extern Lisp_Object QCflowcontrol, Qhw, Qsw, QCsummary; 199extern Lisp_Object QCflowcontrol, Qhw, Qsw, QCsummary;
200 200
201/* Exit statuses for GNU programs that exec other programs. */
202enum
203{
204 EXIT_CANCELED = 125, /* Internal error prior to exec attempt. */
205 EXIT_CANNOT_INVOKE = 126, /* Program located, but not usable. */
206 EXIT_ENOENT = 127 /* Could not find program to exec. */
207};
208
201/* Defined in callproc.c. */ 209/* Defined in callproc.c. */
202 210
203extern void block_child_signal (void); 211extern void block_child_signal (void);