Re: [RFC] Cleaning up die() error messages
- From
Alex Riesen <raa.lkml@gmail.com>
- Date
- Oct 11, 2005, 15:02 UTC
- Message-ID
- <81b0412b0510110802lbcdebe0m17bce7ca81ea76d2@mail.gmail.com>
- In-Reply-To
- <20051010105008.GB30202@gentoo.org>
On 10/10/05, Elfyn McBratney <beu@gentoo.org> wrote:
> int main (int argc, char **argv)
> {
> set_prog_name(argv[0]);I'd also use readlink on /proc/self/exe by default (if set_prog_name _not_ called). It simplifies the code at least on linux, and makes possible very slow transition for other platforms. So you don't have to update each and every .c file containing "main[[:space:]]*(" ;)