* bitbake-layers: add signal hander to avoid exception
@ 2017-04-10 9:22 Zhixiong Chi
2017-04-11 14:47 ` Richard Purdie
0 siblings, 1 reply; 4+ messages in thread
From: Zhixiong Chi @ 2017-04-10 9:22 UTC (permalink / raw)
To: bitbake-devel
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@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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: bitbake-layers: add signal hander to avoid exception
2017-04-10 9:22 bitbake-layers: add signal hander to avoid exception Zhixiong Chi
@ 2017-04-11 14:47 ` Richard Purdie
2017-04-12 3:27 ` Zhixiong Chi
0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2017-04-11 14:47 UTC (permalink / raw)
To: Zhixiong Chi, bitbake-devel
On Mon, 2017-04-10 at 17:22 +0800, Zhixiong Chi wrote:
> 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@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
Stylistically, we tend to do:
import signal
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
so I've a small preference for that. I discussed this with Paul and we
think other bitbake tools may also have this issue. We wondered if it
was possible to do something more centrally in bitbake, and/or fix the
other tools at the same time.
Any thoughts on that?
Cheers,
Richard
> 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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: bitbake-layers: add signal hander to avoid exception
2017-04-11 14:47 ` Richard Purdie
@ 2017-04-12 3:27 ` Zhixiong Chi
2017-04-12 10:07 ` Paul Eggleton
0 siblings, 1 reply; 4+ messages in thread
From: Zhixiong Chi @ 2017-04-12 3:27 UTC (permalink / raw)
To: Richard Purdie, bitbake-devel
On 2017年04月11日 22:47, Richard Purdie wrote:
> On Mon, 2017-04-10 at 17:22 +0800, Zhixiong Chi wrote:
>> 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@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
> Stylistically, we tend to do:
>
> import signal
>
> signal.signal(signal.SIGPIPE, signal.SIG_DFL)
Thanks for your suggestion, I will send v2 patch later.
>
> so I've a small preference for that. I discussed this with Paul and we
> think other bitbake tools may also have this issue. We wondered if it
> was possible to do something more centrally in bitbake, and/or fix the
> other tools at the same time.
>
> Any thoughts on that?
I agree with this, unfortunately out testing team haven't met this issue
in other bitbake tools yet.
Thanks.
>
> Cheers,
>
> Richard
>
>> 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
>>
--
---------------------
Thanks,
Zhixiong Chi
Tel: +86-10-8477-7036
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: bitbake-layers: add signal hander to avoid exception
2017-04-12 3:27 ` Zhixiong Chi
@ 2017-04-12 10:07 ` Paul Eggleton
0 siblings, 0 replies; 4+ messages in thread
From: Paul Eggleton @ 2017-04-12 10:07 UTC (permalink / raw)
To: Zhixiong Chi; +Cc: bitbake-devel
On Wednesday, 12 April 2017 3:27:32 PM NZST Zhixiong Chi wrote:
> On 2017年04月11日 22:47, Richard Purdie wrote:
> > I discussed this with Paul and we
> > think other bitbake tools may also have this issue. We wondered if it
> > was possible to do something more centrally in bitbake, and/or fix the
> > other tools at the same time.
> >
> > Any thoughts on that?
>
> I agree with this, unfortunately out testing team haven't met this issue
> in other bitbake tools yet.
FYI bitbake -e | less and then quit will trigger it with bitbake itself.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-04-12 10:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-10 9:22 bitbake-layers: add signal hander to avoid exception Zhixiong Chi
2017-04-11 14:47 ` Richard Purdie
2017-04-12 3:27 ` Zhixiong Chi
2017-04-12 10:07 ` Paul Eggleton
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.