[sheepdog] [Qemu-devel] [PATCH v4 01/10] ignore SIGPIPE in qemu-img and qemu-io

Stefan Hajnoczi stefanha at gmail.com
Tue Jul 30 15:41:16 CEST 2013


On Fri, Jul 26, 2013 at 03:10:43PM +0900, MORITA Kazutaka wrote:
> This prevents the tools from being stopped when they write data to a
> closed connection in the other side.
> 
> Reviewed-by: Paolo Bonzini <pbonzini at redhat.com>
> Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
> ---
>  qemu-img.c | 4 ++++
>  qemu-io.c  | 4 ++++
>  2 files changed, 8 insertions(+)
> 
> diff --git a/qemu-img.c b/qemu-img.c
> index c55ca5c..919d464 100644
> --- a/qemu-img.c
> +++ b/qemu-img.c
> @@ -2319,6 +2319,10 @@ int main(int argc, char **argv)
>      const img_cmd_t *cmd;
>      const char *cmdname;
>  
> +#ifdef CONFIG_POSIX
> +    signal(SIGPIPE, SIG_IGN);
> +#endif

Reusing os_setup_early_signal_handling() would be messy, this seems fine
for now.

Reviewed-by: Stefan Hajnoczi <stefanha at redhat.com>



More information about the sheepdog mailing list