summaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2008-02-18 21:11:24 +0100
committerJens Axboe <jens.axboe@oracle.com>2008-02-18 21:11:24 +0100
commitad830ed7386eff264bdb5189675d6dfa672bd16b (patch)
treecf0b7e3164845f43cc2bb78c402a340638534288 /engines
parent7d6a8904cc2973a857f4bb50f85e7c75375c553d (diff)
downloadfio-ad830ed7386eff264bdb5189675d6dfa672bd16b.tar.gz
Add FIO_SIGQUIT engine option
For network engines, we need a signal to make it abort the connection if it isn't already running. Otherwise fio would just stall on ctrl-c before the connection was established. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'engines')
-rw-r--r--engines/net.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/net.c b/engines/net.c
index 552ad0bd..f6ae3790 100644
--- a/engines/net.c
+++ b/engines/net.c
@@ -264,6 +264,7 @@ static int fio_netio_accept(struct thread_data *td, struct fio_file *f)
pfd.events = POLLIN;
ret = poll(&pfd, 1, -1);
+ printf("got ret %d\n", ret);
if (ret < 0) {
if (errno == EINTR)
continue;
@@ -463,7 +464,8 @@ static struct ioengine_ops ioengine_rw = {
.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 = {
@@ -476,7 +478,8 @@ 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)