Lines Matching refs:ffi
483 struct fio_fork_item *ffi;
485 ffi = malloc(sizeof(*ffi));
486 ffi->exitval = 0;
487 ffi->signal = 0;
488 ffi->exited = 0;
489 ffi->pid = pid;
490 flist_add_tail(&ffi->list, list);
505 static void fio_server_check_fork_item(struct fio_fork_item *ffi)
509 ret = waitpid(ffi->pid, &status, WNOHANG);
512 log_err("fio: connection pid %u disappeared\n", (int) ffi->pid);
513 ffi->exited = 1;
516 } else if (ret == ffi->pid) {
518 ffi->signal = WTERMSIG(status);
519 ffi->exited = 1;
523 ffi->exitval = WEXITSTATUS(status);
524 ffi->exited = 1;
529 static void fio_server_fork_item_done(struct fio_fork_item *ffi)
531 dprint(FD_NET, "pid %u exited, sig=%u, exitval=%d\n", (int) ffi->pid, ffi->signal, ffi->exitval);
536 fio_net_send_stop(server_fd, ffi->exitval, ffi->signal);
538 flist_del(&ffi->list);
539 free(ffi);
545 struct fio_fork_item *ffi;
548 ffi = flist_entry(entry, struct fio_fork_item, list);
550 fio_server_check_fork_item(ffi);
552 if (ffi->exited)
553 fio_server_fork_item_done(ffi);