[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: error module should depend on progname
From: |
Paul Eggert |
Subject: |
Re: error module should depend on progname |
Date: |
Thu, 21 Nov 2013 13:50:38 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 |
On 11/21/2013 12:52 PM, Nikos Mavrogiannopoulos wrote:
> does xalloc-die really
> needs to report using error()?
xalloc-die is for use by standalone programs which
desire a particular standard way of handling memory
exhaustion, namely a diagnostic and nonzero exit
status like this:
$ od -S 1152921504606846976
od: memory exhausted
$ echo $?
1
If you'd rather not have your program behave that way,
or if you don't want to depend on the error module,
you can substitute your own implementation of the
xalloc-die module, and invoke gnulib-tool with
the --avoid=xalloc-die option. For sanity's sake
your implementation should include xalloc.h so that
its malloc_die signature matches the expected one.