ext/libuv/src/unix/process.c in libuv-1.1.3 vs ext/libuv/src/unix/process.c in libuv-1.2.0
- old
+ new
@@ -83,12 +83,17 @@
process->status = status;
QUEUE_REMOVE(&process->queue);
QUEUE_INSERT_TAIL(&pending, &process->queue);
}
- QUEUE_FOREACH(q, &pending) {
+ h = &pending;
+ q = QUEUE_HEAD(h);
+ while (q != h) {
process = QUEUE_DATA(q, uv_process_t, queue);
- QUEUE_REMOVE(q);
+ q = QUEUE_NEXT(q);
+
+ QUEUE_REMOVE(&process->queue);
+ QUEUE_INIT(&process->queue);
uv__handle_stop(process);
if (process->exit_cb == NULL)
continue;