FS#12592 - mkimxboot calls exit() on errors

Attached to Project: Rockbox
Opened by Dominik Riebeling (bluebrother) - Sunday, 19 February 2012, 16:55 GMT
Last edited by Bertrik Sikken (bertrik) - Sunday, 15 April 2012, 13:46 GMT
Task Type Bugs
Category Rbutil
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Rbutil SVN
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


mkimxboot / imxtools use exit() in case of an error. This will cause Rockbox Utility to (unexpectedly) terminate since the OS will terminate the application, while a user will expect some response from the UI.

imxtools must not call exit(), instead it must provide the error information to the caller.
This task depends upon

Closed by  Bertrik Sikken (bertrik)
Sunday, 15 April 2012, 13:46 GMT
Reason for closing:  Fixed
Additional comments about closing:  Should be fixed now, see last comment
Comment by Jean-Louis Biasini (JeanLouisBiasini) - Thursday, 15 March 2012, 18:03 GMT
according to pamaury this is already fixed, should we close?
Comment by Bertrik Sikken (bertrik) - Saturday, 14 April 2012, 10:43 GMT
Indeed, looks like this was fixed in c483905b9244646e89bc36940da7ea5a65e37392 :

imxtools: remove most calls to bug/bugp from core library.

It should not exit() anymore on error except on malloc failure.
Resource leaks on errors (especially I/O) are quite likely though.