- /* got something. Take the last one out of output_queue */
- work_p = &p->output_queue;
- if (!*work_p)
- return 0;
-
- read(p->fd[0], read_buf, 1);
-
- while ((*work_p)->next)
- work_p = &(*work_p)->next;
- work_this = *work_p;
- *work_p = 0;
-
- /* put freed item in free list */
- work_this->next = p->free_queue;
- p->free_queue = work_this;