bug-gnulib
[Top][All Lists]
Advanced

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

closeout bug?


From: Eric Blake
Subject: closeout bug?
Date: Fri, 21 Jul 2006 14:31:17 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

POSIX states that:
If, at normal process termination, a function registered by the atexit() 
function is called and a portable application needs to stop further exit() 
processing, it must call the _exit() function or the _Exit() function or one of 
the functions which cause abnormal process termination.

However, in the closeout module, close_stdout() invokes error() which invokes 
exit(), and I have seen a lot of uses of atexit(close_stdout) in GNU programs 
that use the closeout module.

Is this potential bug worth addressing?  Or is it portable in practice to use 
exit() inside an atexit() handler to change the exit status, in spite of the 
warning from POSIX?

-- 
Eric Blake






reply via email to

[Prev in Thread] Current Thread [Next in Thread]