Skip to content

Add SIGINT handler to cli --intrinsic-latency - #1658

Merged
antirez merged 1 commit into
redis:unstablefrom
mattsta:redis-cli-latency-clean-interrupt
Jun 17, 2014
Merged

antirez merged 1 commit into
redis:unstablefrom
mattsta:redis-cli-latency-clean-interrupt

Conversation

@mattsta

@mattsta mattsta commented Apr 3, 2014

Copy link
Copy Markdown
Contributor

Minor addition to make redis-cli --intrinsic-latency 10% more user friendly.

If we run a long latency session and want to Ctrl-C out of it,
it's nice to still get the summary output at the end.

@antirez

antirez commented Jun 9, 2014

Copy link
Copy Markdown
Contributor

Good idea, however you need to put this sentinel variable out of the config structure and use volatile sig_atomic_t to declare it. Otherwise the loop may not see the change at all, since the compiler may assume it never changes.

If we run a long latency session and want to Ctrl-C out of it,
it's nice to still get the summary output at the end.
@mattsta

mattsta commented Jun 17, 2014

Copy link
Copy Markdown
Contributor Author

Updated! Moved the stop flag from config.stop_now to file global force_cancel_loop.

If we're merging clean shutdown/exit improvements, also see: https://github.com/antirez/redis/pull/1637

antirez added a commit that referenced this pull request Jun 17, 2014
Add SIGINT handler to cli --intrinsic-latency
@antirez
antirez merged commit 3a48268 into redis:unstable Jun 17, 2014
@antirez

antirez commented Jun 17, 2014

Copy link
Copy Markdown
Contributor

Thanks Matt! Merged.

@mattsta
mattsta deleted the redis-cli-latency-clean-interrupt branch November 20, 2014 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants