[U-Boot] [PATCH v2] MAKEALL: Add summary information

Wolfgang Denk wd at denx.de
Mon Sep 21 10:40:45 CEST 2009


Dear Peter Tyser,

In message <1253489996.27060.60.camel at 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_


More information about the U-Boot mailing list