comparison src/process.c @ 14496:beca72fdb420

(sigchld_handler): Use cleaner end-of-list test.
author Karl Heuer <kwzh@gnu.org>
date Mon, 05 Feb 1996 20:32:20 +0000
parents 2bb4652305c1
children 912efc7b4d10
comparison
equal deleted inserted replaced
14495:fc4be3d538e0 14496:beca72fdb420
3319 #endif /* no WNOHANG */ 3319 #endif /* no WNOHANG */
3320 3320
3321 /* Find the process that signaled us, and record its status. */ 3321 /* Find the process that signaled us, and record its status. */
3322 3322
3323 p = 0; 3323 p = 0;
3324 for (tail = Vprocess_alist; XSYMBOL (tail) != XSYMBOL (Qnil); tail = XCONS (tail)->cdr) 3324 for (tail = Vprocess_alist; CONSP (tail); tail = XCONS (tail)->cdr)
3325 { 3325 {
3326 proc = XCONS (XCONS (tail)->car)->cdr; 3326 proc = XCONS (XCONS (tail)->car)->cdr;
3327 p = XPROCESS (proc); 3327 p = XPROCESS (proc);
3328 if (EQ (p->childp, Qt) && XFASTINT (p->pid) == pid) 3328 if (EQ (p->childp, Qt) && XFASTINT (p->pid) == pid)
3329 break; 3329 break;
3331 } 3331 }
3332 3332
3333 /* Look for an asynchronous process whose pid hasn't been filled 3333 /* Look for an asynchronous process whose pid hasn't been filled
3334 in yet. */ 3334 in yet. */
3335 if (p == 0) 3335 if (p == 0)
3336 for (tail = Vprocess_alist; XSYMBOL (tail) != XSYMBOL (Qnil); tail = XCONS (tail)->cdr) 3336 for (tail = Vprocess_alist; CONSP (tail); tail = XCONS (tail)->cdr)
3337 { 3337 {
3338 proc = XCONS (XCONS (tail)->car)->cdr; 3338 proc = XCONS (XCONS (tail)->car)->cdr;
3339 p = XPROCESS (proc); 3339 p = XPROCESS (proc);
3340 if (INTEGERP (p->pid) && XINT (p->pid) == -1) 3340 if (INTEGERP (p->pid) && XINT (p->pid) == -1)
3341 break; 3341 break;