pfd.events = POLLIN;
ret = poll(&pfd, 1, -1);
+ printf("got ret %d\n", ret);
if (ret < 0) {
if (errno == EINTR)
continue;
.cleanup = fio_netio_cleanup,
.open_file = fio_netio_open_file,
.close_file = generic_close_file,
- .flags = FIO_SYNCIO | FIO_DISKLESSIO | FIO_UNIDIR,
+ .flags = FIO_SYNCIO | FIO_DISKLESSIO | FIO_UNIDIR |
+ FIO_SIGQUIT,
};
static struct ioengine_ops ioengine_splice = {
.cleanup = fio_netio_cleanup,
.open_file = fio_netio_open_file,
.close_file = generic_close_file,
- .flags = FIO_SYNCIO | FIO_DISKLESSIO | FIO_UNIDIR,
+ .flags = FIO_SYNCIO | FIO_DISKLESSIO | FIO_UNIDIR |
+ FIO_SIGQUIT,
};
static void fio_init fio_netio_register(void)
for_each_td(td, i) {
if (group_id == TERMINATE_ALL || groupid == td->groupid) {
dprint(FD_PROCESS, "setting terminate on %d\n",td->pid);
+
+ td->terminate = 1;
+ td->o.start_delay = 0;
+
/*
* if the thread is running, just let it exit
*/
if (td->runstate < TD_RUNNING)
kill(td->pid, SIGQUIT);
- td->terminate = 1;
- td->o.start_delay = 0;
+ else if (td->io_ops->flags & FIO_SIGQUIT)
+ kill(td->pid, SIGQUIT);
}
}
}
FIO_NODISKUTIL = 1 << 4, /* diskutil can't handle filename */
FIO_UNIDIR = 1 << 5, /* engine is uni-directional */
FIO_NOIO = 1 << 6, /* thread does only pseudo IO */
+ FIO_SIGQUIT = 1 << 7, /* needs SIGQUIT to exit */
};
enum fio_file_flags {