Bug 11761

Summary: Broken pipe when paginating bitbake -e
Product: [Build System, Metadata & Runtime] BitBake Reporter: Leonardo Sandoval Gonzalez <leonardo.sandoval.gonzalez>
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED NOTABUG QA Contact:
Severity: minor    
Priority: Undecided CC: poky.bs.watcher, poky.watcher
Version: 2.4   
Target Milestone: ---   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Leonardo Sandoval Gonzalez 2017-07-05 21:32:11 UTC
If 'less' is quit ('q') in the first page where input comes from bitbake -e, the following error occurs:

$ bitbake -e | less
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>
BrokenPipeError: [Errno 32] Broken pipe


Seems that the errno.EPIPE should be caught somewhere instead of passing it to the console.
Comment 1 Richard Purdie 2017-07-06 15:11:58 UTC
If less quits, bitbake loses its stdout. Its reasonable it prints a pipe error at this point which is what a standard commandline utility would do. The alternative is to silently swallow an error when stdout has disappeared and we still have output which seems worse to me so I don't think we can improve this as described.