aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorPaul Eggert2012-08-01 21:14:48 -0700
committerPaul Eggert2012-08-01 21:14:48 -0700
commit13294f95172c68a5e77143f917231e0f17f37537 (patch)
tree64d703087135fe71be44b267ca9d105ede888cc9 /src/process.c
parent90df0db330dc6d168bf8cdb950a066a2916857ad (diff)
downloademacs-13294f95172c68a5e77143f917231e0f17f37537.tar.gz
emacs-13294f95172c68a5e77143f917231e0f17f37537.zip
Port to Solaris 8.
Without this change, 'configure' fails because the recently-added wait3 prototype in config.h messes up later 'configure' tests. Fix this problem by droping wait3 and WRETCODE, as they're no longer needed on hosts that are current porting targets. * configure.ac (wait3, WRETCODE): Remove, fixing a FIXME. All uses changed to waitpid and WEXITSTATUS. * src/syswait.h (WRETCODE): Remove, consistently with ../configure.ac.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/process.c b/src/process.c
index 47f10814333..2d2a1b5ac0e 100644
--- a/src/process.c
+++ b/src/process.c
@@ -441,7 +441,7 @@ status_convert (int w)
441 if (WIFSTOPPED (w)) 441 if (WIFSTOPPED (w))
442 return Fcons (Qstop, Fcons (make_number (WSTOPSIG (w)), Qnil)); 442 return Fcons (Qstop, Fcons (make_number (WSTOPSIG (w)), Qnil));
443 else if (WIFEXITED (w)) 443 else if (WIFEXITED (w))
444 return Fcons (Qexit, Fcons (make_number (WRETCODE (w)), 444 return Fcons (Qexit, Fcons (make_number (WEXITSTATUS (w)),
445 WCOREDUMP (w) ? Qt : Qnil)); 445 WCOREDUMP (w) ? Qt : Qnil));
446 else if (WIFSIGNALED (w)) 446 else if (WIFSIGNALED (w))
447 return Fcons (Qsignal, Fcons (make_number (WTERMSIG (w)), 447 return Fcons (Qsignal, Fcons (make_number (WTERMSIG (w)),
@@ -4287,7 +4287,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
4287 FD_ZERO (&Writeok); 4287 FD_ZERO (&Writeok);
4288 4288
4289 if (time_limit == 0 && nsecs == 0 && wait_proc && !NILP (Vinhibit_quit) 4289 if (time_limit == 0 && nsecs == 0 && wait_proc && !NILP (Vinhibit_quit)
4290 && !(CONSP (PVAR (wait_proc, status)) 4290 && !(CONSP (PVAR (wait_proc, status))
4291 && EQ (XCAR (PVAR (wait_proc, status)), Qexit))) 4291 && EQ (XCAR (PVAR (wait_proc, status)), Qexit)))
4292 message ("Blocking call to accept-process-output with quit inhibited!!"); 4292 message ("Blocking call to accept-process-output with quit inhibited!!");
4293 4293
@@ -4887,7 +4887,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
4887 if (p->pid == -2) 4887 if (p->pid == -2)
4888 { 4888 {
4889 /* If the EIO occurs on a pty, sigchld_handler's 4889 /* If the EIO occurs on a pty, sigchld_handler's
4890 wait3() will not find the process object to 4890 waitpid() will not find the process object to
4891 delete. Do it here. */ 4891 delete. Do it here. */
4892 p->tick = ++process_tick; 4892 p->tick = ++process_tick;
4893 PVAR (p, status) = Qfailed; 4893 PVAR (p, status) = Qfailed;
@@ -4959,7 +4959,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
4959 if (xerrno) 4959 if (xerrno)
4960 { 4960 {
4961 p->tick = ++process_tick; 4961 p->tick = ++process_tick;
4962 PVAR (p, status) 4962 PVAR (p, status)
4963 = Fcons (Qfailed, Fcons (make_number (xerrno), Qnil)); 4963 = Fcons (Qfailed, Fcons (make_number (xerrno), Qnil));
4964 deactivate_process (proc); 4964 deactivate_process (proc);
4965 } 4965 }
@@ -6352,7 +6352,7 @@ sigchld_handler (int signo)
6352 do 6352 do
6353 { 6353 {
6354 errno = 0; 6354 errno = 0;
6355 pid = wait3 (&w, WNOHANG | WUNTRACED, 0); 6355 pid = waitpid (-1, &w, WNOHANG | WUNTRACED);
6356 } 6356 }
6357 while (pid < 0 && errno == EINTR); 6357 while (pid < 0 && errno == EINTR);
6358 6358
@@ -6440,7 +6440,7 @@ sigchld_handler (int signo)
6440 6440
6441 /* Report the status of the synchronous process. */ 6441 /* Report the status of the synchronous process. */
6442 if (WIFEXITED (w)) 6442 if (WIFEXITED (w))
6443 synch_process_retcode = WRETCODE (w); 6443 synch_process_retcode = WEXITSTATUS (w);
6444 else if (WIFSIGNALED (w)) 6444 else if (WIFSIGNALED (w))
6445 synch_process_termsig = WTERMSIG (w); 6445 synch_process_termsig = WTERMSIG (w);
6446 6446
@@ -6746,7 +6746,7 @@ suppressed. */)
6746 CHECK_PROCESS (process); 6746 CHECK_PROCESS (process);
6747 p = XPROCESS (process); 6747 p = XPROCESS (process);
6748 if (NILP (flag)) 6748 if (NILP (flag))
6749 PVAR (p, decode_coding_system) 6749 PVAR (p, decode_coding_system)
6750 = raw_text_coding_system (PVAR (p, decode_coding_system)); 6750 = raw_text_coding_system (PVAR (p, decode_coding_system));
6751 setup_process_coding_systems (process); 6751 setup_process_coding_systems (process);
6752 6752