|
From: | Bruce Korb |
Subject: | Re: [PATCH] bootstrap: use a more consistent error reporting scheme. |
Date: | Fri, 06 Jul 2012 09:04:59 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120421 Thunderbird/12.0 |
On 07/06/12 06:11, Akim Demaille wrote: One other tiny nit that is helpful in a die() function: It isn't necessarily true that "die" always gets invoked from the main process. If it gets invoked from a subprocess for any of a variety of reasons, this: +die() { warn_ "$@"; exit 1; } won't work. I use this (more or less) as a standard template: readonly progpid=$$ die() { warn_ "$@" kill -9 $progpid exit 1 } 1>&2
[Prev in Thread] | Current Thread | [Next in Thread] |