ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.c
(Generate patch)

Comparing libev/ev.c (file contents):
Revision 1.37 by root, Thu Nov 1 13:33:12 2007 UTC vs.
Revision 1.39 by root, Thu Nov 1 17:17:32 2007 UTC

366 366
367static void 367static void
368sigcb (struct ev_io *iow, int revents) 368sigcb (struct ev_io *iow, int revents)
369{ 369{
370 struct ev_signal *w; 370 struct ev_signal *w;
371 int sig; 371 int signum;
372 372
373 read (sigpipe [0], &revents, 1); 373 read (sigpipe [0], &revents, 1);
374 gotsig = 0; 374 gotsig = 0;
375 375
376 for (sig = signalmax; sig--; ) 376 for (signum = signalmax; signum--; )
377 if (signals [sig].gotsig) 377 if (signals [signum].gotsig)
378 { 378 {
379 signals [sig].gotsig = 0; 379 signals [signum].gotsig = 0;
380 380
381 for (w = signals [sig].head; w; w = w->next) 381 for (w = signals [signum].head; w; w = w->next)
382 event ((W)w, EV_SIGNAL); 382 event ((W)w, EV_SIGNAL);
383 } 383 }
384} 384}
385 385
386static void 386static void
423 struct ev_child *w; 423 struct ev_child *w;
424 int pid, status; 424 int pid, status;
425 425
426 while ((pid = waitpid (-1, &status, WNOHANG | WUNTRACED | WCONTINUED)) != -1) 426 while ((pid = waitpid (-1, &status, WNOHANG | WUNTRACED | WCONTINUED)) != -1)
427 for (w = childs [pid & (PID_HASHSIZE - 1)]; w; w = w->next) 427 for (w = childs [pid & (PID_HASHSIZE - 1)]; w; w = w->next)
428 if (w->pid == pid || w->pid == -1) 428 if (w->pid == pid || !w->pid)
429 { 429 {
430 w->status = status; 430 w->status = status;
431 event ((W)w, EV_CHILD); 431 event ((W)w, EV_CHILD);
432 } 432 }
433} 433}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines