-
-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix quit confirmation during debuggin session. #3916
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we move the if (debug)
code below the
if (rz_config_get_i(r->config, "scr.confirmquit")) {
if (!rz_cons_yesno('n', "Do you want to quit? (Y/n)")) {
continue;
}
}
?
It would need some adjustments, but I think it would make more sense. There's some duplicated code here.
librz/main/rizin.c
Outdated
if (rz_config_get_i(r->config, "dbg.exitkills") && | ||
rz_debug_can_kill(r->dbg) && | ||
rz_cons_yesno('y', "Do you want to kill the process? (Y/n)")) { | ||
rz_config_set_i(r->config, "scr.confirmquit", false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not needed anymore?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understood, here is my approach
What I have done here is
if scr.confirmquit
is true, then the program will ask for quit confirmation and continue if n is returned.
if y is returned then the program will ask for to kill the process is and will not continue to the loop in any case.
be66972
to
148e926
Compare
(Closes #3818) |
IMO the PR is in good shape. @wargio ? |
b14d682
to
58229f2
Compare
aec85eb
to
ee14cf9
Compare
Thank you <3 |
Your checklist for this pull request
Detailed description
In
librz/main/rizin.c
, when in debugger session the program ask for quit confirmation independent ofscr.confirmquit
true or false.So the quit confirmation when in debug session is removed, and the code for debug session is pasted below the general quit confirm message, Now if user wants to quit then only program will ask to kill the process otherwise the program will just continue
Test plan
...
Closing issues
Closes #3818