[bitbake-devel] bitbake-layers: add signal hander to avoid exception
Zhixiong Chi
zhixiong.chi at windriver.com
Mon Apr 10 09:22:44 UTC 2017
Fixed:
bitbake-layers show-recipes | less
press "q" to exit
There will be a Broken pipe error output as follows:
"BrokenPipeError: [Errno 32] Broken pipe"
Signed-off-by: Zhixiong Chi <zhixiong.chi at windriver.com>
---
bin/bitbake-layers | 2 ++
1 file changed, 2 insertions(+)
diff --git a/bin/bitbake-layers b/bin/bitbake-layers
index 390ad05..d58022d 100755
--- a/bin/bitbake-layers
+++ b/bin/bitbake-layers
@@ -20,6 +20,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+from signal import signal, SIGPIPE, SIG_DFL
import logging
import os
import sys
@@ -35,6 +36,7 @@ import bb.msg
logger = bb.msg.logger_create('bitbake-layers', sys.stdout)
def main():
+ signal(SIGPIPE, SIG_DFL)
parser = argparse.ArgumentParser(
description="BitBake layers utility",
epilog="Use %(prog)s <subcommand> --help to get help on a specific command",
--
1.9.1
More information about the bitbake-devel
mailing list