-
Notifications
You must be signed in to change notification settings - Fork 145
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
Remove all calls to exit(3) from libavrdude library functions #774
Comments
Converting exit(n) into return -n is relatively hard, as this may involve returning through a number of nested calls on the stack. I wonder whether setjmp()/longjmp() can provide a useful interface for the (weaker) aim of keeping the GUI alive so it can handle any problems gracefully. Converting exit() to longjmp() can be done with relative ease. |
Any new ideas about this issue? |
(Previously, this had been marked as a "task" on Savannah, with nobody actually backing it.)
Quite some time ago, all the backend functionality of AVRDUDE had been moved out into libavrdude. The idea behind that was that the current
src/main.c
just describes one possible frontend, so it could be e.g. accompanied by a kind of GUI frontend as well.However, some of the historic implementations gratuitously call
exit()
in case of a failure. This is fatal for a GUI application, which rather would prefer to give the user a kind of graphical response of the failure. Thus, call calls toexit()
need to be converted into returning (and handling) an error code instead.The text was updated successfully, but these errors were encountered: