aboutsummaryrefslogtreecommitdiffstats
path: root/src/callproc.c
diff options
context:
space:
mode:
authorPaul Eggert2016-12-06 15:25:54 -0800
committerPaul Eggert2016-12-06 15:26:11 -0800
commitc95270ad4b48204880ae10ec730eb121ffa14abe (patch)
tree1f14c9708a157112ed4cc2c176d7fe5233c4819b /src/callproc.c
parent38d0276ad122d1a7663ecca965506f85b4e29b7f (diff)
downloademacs-c95270ad4b48204880ae10ec730eb121ffa14abe.tar.gz
emacs-c95270ad4b48204880ae10ec730eb121ffa14abe.zip
Change two _Noreturn functions to return void
This is a bit clearer than _Noreturn functions that (do not) return a non-void type. * src/callproc.c (call_process) [MSDOS]: Use 'status' local to record status. (child_setup): Return CHILD_SETUP_TYPE. * src/data.c, src/lisp.h (wrong_type_argument): Return void. All callers changed. * src/lisp.h (CHILD_SETUP_TYPE): New macro.
Diffstat (limited to 'src/callproc.c')
-rw-r--r--src/callproc.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/callproc.c b/src/callproc.c
index dc3ca4ac102..02db3483ff2 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -293,7 +293,6 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd,
293 Lisp_Object output_file = Qnil; 293 Lisp_Object output_file = Qnil;
294#ifdef MSDOS /* Demacs 1.1.1 91/10/16 HIRANO Satoshi */ 294#ifdef MSDOS /* Demacs 1.1.1 91/10/16 HIRANO Satoshi */
295 char *tempfile = NULL; 295 char *tempfile = NULL;
296 int pid;
297#else 296#else
298 sigset_t oldset; 297 sigset_t oldset;
299 pid_t pid; 298 pid_t pid;
@@ -538,11 +537,9 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd,
538 } 537 }
539 538
540#ifdef MSDOS /* MW, July 1993 */ 539#ifdef MSDOS /* MW, July 1993 */
541 /* Note that on MSDOS `child_setup' actually returns the child process 540 status = child_setup (filefd, fd_output, fd_error, new_argv, 0, current_dir);
542 exit status, not its PID, so assign it to status below. */
543 pid = child_setup (filefd, fd_output, fd_error, new_argv, 0, current_dir);
544 541
545 if (pid < 0) 542 if (status < 0)
546 { 543 {
547 child_errno = errno; 544 child_errno = errno;
548 unbind_to (count, Qnil); 545 unbind_to (count, Qnil);
@@ -551,7 +548,6 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd,
551 code_convert_string_norecord (build_string (strerror (child_errno)), 548 code_convert_string_norecord (build_string (strerror (child_errno)),
552 Vlocale_coding_system, 0); 549 Vlocale_coding_system, 0);
553 } 550 }
554 status = pid;
555 551
556 for (i = 0; i < CALLPROC_FDS; i++) 552 for (i = 0; i < CALLPROC_FDS; i++)
557 if (0 <= callproc_fd[i]) 553 if (0 <= callproc_fd[i])
@@ -1163,9 +1159,13 @@ exec_failed (char const *name, int err)
1163 CURRENT_DIR is an elisp string giving the path of the current 1159 CURRENT_DIR is an elisp string giving the path of the current
1164 directory the subprocess should have. Since we can't really signal 1160 directory the subprocess should have. Since we can't really signal
1165 a decent error from within the child, this should be verified as an 1161 a decent error from within the child, this should be verified as an
1166 executable directory by the parent. */ 1162 executable directory by the parent.
1163
1164 On GNUish hosts, either exec or return an error number.
1165 On MS-Windows, either return a pid or signal an error.
1166 On MS-DOS, either return an exit status or signal an error. */
1167 1167
1168int 1168CHILD_SETUP_TYPE
1169child_setup (int in, int out, int err, char **new_argv, bool set_pgrp, 1169child_setup (int in, int out, int err, char **new_argv, bool set_pgrp,
1170 Lisp_Object current_dir) 1170 Lisp_Object current_dir)
1171{ 1171{