All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scripts/bloat-o-meter: fix SIGPIPE
@ 2016-10-28 20:46 Alexey Dobriyan
  0 siblings, 0 replies; only message in thread
From: Alexey Dobriyan @ 2016-10-28 20:46 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, mpm

Fix piping output to a program which quickly exits (read: head -n1)


	$ ./scripts/bloat-o-meter ../vmlinux-000 ../obj/vmlinux | head -n1
	add/remove: 0/0 grow/shrink: 9/60 up/down: 124/-305 (-181)
	close failed in file object destructor:
	sys.excepthook is missing
	lost sys.stderr

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 scripts/bloat-o-meter | 3 +++
 1 file changed, 3 insertions(+)

--- a/scripts/bloat-o-meter
+++ b/scripts/bloat-o-meter
@@ -8,6 +8,9 @@
 # of the GNU General Public License, incorporated herein by reference.
 
 import sys, os, re
+from signal import signal, SIGPIPE, SIG_DFL
+
+signal(SIGPIPE, SIG_DFL)
 
 if len(sys.argv) != 3:
     sys.stderr.write("usage: %s file1 file2\n" % sys.argv[0])

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-10-28 18:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-28 20:46 [PATCH] scripts/bloat-o-meter: fix SIGPIPE Alexey Dobriyan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.