[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: DeviceKit and /usr

Josselin Mouette wrote:
Le mardi 08 septembre 2009 à 13:00 +0200, Bjørn Mork a écrit :
Trusting a library to do all your error handling and cleanup is not good
style IMHO.  In addition to the lack of self-documenting source, it
often leave you with the meaningless generic error messages some OSes
are so full of.  Applications doing their own error handling are in a
much better position to provide specific meaningfull error messages to
the user.

If a memory allocation failed while you were manipulating strings (an
operation with very low requirements), you are not likely to obtain
enough memory to even display an error message.

Frankly, I prefer to be sure that the process will crash properly in
extreme cases. And more importantly, not having to handle return codes
for every function is much less prone to programming errors; something
that is shared by most Glib string utility functions. And programming
errors in string manipulations represent an important part of security

We are talking with low-level application. Such application must be
safer (and clean-up the environment and lock in case of errors). We prefer
a limited system then a unstable stystem (half initialized).

We are using the wrong tool for such task: glib is made for the other
end of application, not for daemon and basic utilities, where the
requirement are different.

And the entire discussion is about this topic, not about if glib is
good or not.

PS: I'm thinking on old low-mem computer (e.g. for schools) where
Linux is the only alternative to the trash.


Reply to: