From: Wolfgang Denk Date: Mon, 21 Sep 2009 10:40:45 +0200 Subject: [U-Boot] [PATCH v2] MAKEALL: Add summary information In-Reply-To: <1253489996.27060.60.camel@ptyser-laptop> References: <1253316982-20606-1-git-send-email-ptyser@xes-inc.com> <20090920220825.0D9C4832E864@gemini.denx.de> <1253489996.27060.60.camel@ptyser-laptop> Message-ID: <20090921084045.97632832E864@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Peter Tyser, In message <1253489996.27060.60.camel@ptyser-laptop> you wrote: > > > +# Print statistics when ctrl-c is pressed > > > +trap "print_stats; exit " 2 > > > > Why only on signal 2? Usually we use "1 2 3 15" in such cases. > > 2's the only case I've ever used for MAKEALL, I'll add the other cases > as you suggest. Thanks. > I didn't trap 0 because I wasn't aware of a quick way to only call > print_stats once when ctrl-c was pressed (eg trapping 0 and 2 would > result in 2 print_stats calls with the current code). Let me know if > there's a standard way to workaround this. I would probably use something like this: trap exit 1 2 3 15 trap print_stats 0 Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Quotation, n. The act of repeating erroneously the words of another. The words erroneously repeated. - Ambrose Bierce _The Devil's Dictionary_