aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/process.c b/src/process.c
index 0ddeb517290..c2a20b92db1 100644
--- a/src/process.c
+++ b/src/process.c
@@ -407,16 +407,14 @@ static char pty_name[24];
407/* Compute the Lisp form of the process status, p->status, from 407/* Compute the Lisp form of the process status, p->status, from
408 the numeric status that was returned by `wait'. */ 408 the numeric status that was returned by `wait'. */
409 409
410static Lisp_Object status_convert (); 410static Lisp_Object status_convert (int);
411 411
412static void 412static void
413update_status (p) 413update_status (p)
414 struct Lisp_Process *p; 414 struct Lisp_Process *p;
415{ 415{
416 union { int i; WAITTYPE wt; } u;
417 eassert (p->raw_status_new); 416 eassert (p->raw_status_new);
418 u.i = p->raw_status; 417 p->status = status_convert (p->raw_status);
419 p->status = status_convert (u.wt);
420 p->raw_status_new = 0; 418 p->raw_status_new = 0;
421} 419}
422 420
@@ -424,8 +422,7 @@ update_status (p)
424 the list that we use internally. */ 422 the list that we use internally. */
425 423
426static Lisp_Object 424static Lisp_Object
427status_convert (w) 425status_convert (int w)
428 WAITTYPE w;
429{ 426{
430 if (WIFSTOPPED (w)) 427 if (WIFSTOPPED (w))
431 return Fcons (Qstop, Fcons (make_number (WSTOPSIG (w)), Qnil)); 428 return Fcons (Qstop, Fcons (make_number (WSTOPSIG (w)), Qnil));
@@ -6698,7 +6695,7 @@ sigchld_handler (signo)
6698 while (1) 6695 while (1)
6699 { 6696 {
6700 pid_t pid; 6697 pid_t pid;
6701 WAITTYPE w; 6698 int w;
6702 Lisp_Object tail; 6699 Lisp_Object tail;
6703 6700
6704#ifdef WNOHANG 6701#ifdef WNOHANG
@@ -6770,12 +6767,10 @@ sigchld_handler (signo)
6770 /* Change the status of the process that was found. */ 6767 /* Change the status of the process that was found. */
6771 if (p != 0) 6768 if (p != 0)
6772 { 6769 {
6773 union { int i; WAITTYPE wt; } u;
6774 int clear_desc_flag = 0; 6770 int clear_desc_flag = 0;
6775 6771
6776 p->tick = ++process_tick; 6772 p->tick = ++process_tick;
6777 u.wt = w; 6773 p->raw_status = w;
6778 p->raw_status = u.i;
6779 p->raw_status_new = 1; 6774 p->raw_status_new = 1;
6780 6775
6781 /* If process has terminated, stop waiting for its output. */ 6776 /* If process has terminated, stop waiting for its output. */