Signed-off-by: Jens Axboe <axboe@kernel.dk>
free(cmd);
continue;
}
+ if (cmd->opcode == FIO_NET_CMD_QUIT) {
+ free(cmd);
+ break;
+ }
if (cmd->opcode != FIO_NET_CMD_TEXT) {
printf("non text: %d\n", cmd->opcode);
free(cmd);
}
#endif
+static int send_quit_command(void)
+{
+ return send_simple_command(server_fd, FIO_NET_CMD_QUIT, 0);
+}
+
static int handle_cur_job(struct fio_net_cmd *cmd, int done)
{
unsigned int left = job_max_len - job_cur_len;
if (done) {
parse_jobs_ini(job_buf, 1, 0);
ret = exec_run();
+ send_quit_command();
reset_fio_state();
free(job_buf);
job_buf = NULL;