bug-gnulib
[Top][All Lists]
Advanced

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

Re: closeout bug?


From: Eric Blake
Subject: Re: closeout bug?
Date: Sat, 22 Jul 2006 03:39:55 +0000

> > Also, should we make the
> > closeout module depend on the atexit module?
> 
> I'd say not, since we assume C89 or better these days.  As I
> understand it the atexit module is needed only for SunOS 4 and
> earlier, which is no longer of concern.

Should we go ahead and delete the atexit module, then?

> 
> > This also puts me in a bit of a dilemma with m4.
> 
> OK, how about this patch instead?  It splits out the atexit part from
> the main part, and m4 can invoke the main part by hand.

I like it.  If no one else objects, go ahead and commit it, or something
like it; then that plus my tmpfile_safer patch should make the upcoming
m4 1.4.6 robust to closed fds with minimal porting effort.  (Anyone care
to give a review on the tmpfile_safer idea?)

Hmm,  maybe to reduce the effort when patching coreutils to use
this new idiom, maybe you should name the two functions
int close_stdout_warn and void close_stdout, rather than your
proposed int close_stdout and void close_stdout_exit (with the
second in each set calling _exit), so that you aren't changing
semantics of existing programs that already do atexit (close_stdout).
But whatever names you settle on, I should be able to use the
non-_exit version in m4 without too much difficulty.

-- 
Eric Blake




reply via email to

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