Is invoking exit(2) in a library the right thing to do?

James Andrewartha trs80 at ucc.gu.uwa.edu.au
Thu Nov 15 10:55:51 CET 2007


On Mon, 5 Nov 2007, Marco d'Itri wrote:
> On Nov 05, Werner Koch <wk at gnupg.org> wrote:
>>> I still do not consider calling exit(2) in a library acceptable under
>>> any condition.
>> So you want abort () instead?  I consider this a bad option in this case
>> because exit handlers would not be run.
> I the function to fail with something like an error code.
>
>> Given the reluctance of many programmers to properly check error codes
>> and act accordingly, there is no choice in critical situation than to
>> terminate the process.
> I still disagree.

The only way forward I can see from here is to refer the issue to the 
Technical Committee. If nobody objects or wants to do it themselves I'll 
write up a summary when I have some free time.

-- 
# TRS-80              trs80(a)ucc.gu.uwa.edu.au #/ "Otherwise Bub here will do \
# UCC Wheel Member     http://trs80.ucc.asn.au/ #|  what squirrels do best     |
[ "There's nobody getting rich writing          ]|  -- Collect and hide your   |
[  software that I know of" -- Bill Gates, 1980 ]\  nuts." -- Acid Reflux #231 /




More information about the Gcrypt-devel mailing list