From patchwork Thu Jan 11 21:20:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Rice X-Patchwork-Id: 7263 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.78.2 with SMTP id r2csp1137944jaa; Thu, 11 Jan 2018 13:20:22 -0800 (PST) X-Google-Smtp-Source: ACJfBov+w1/m7rqV7oMt7UDsU9oIoo6LkdLl/m6b4sQ2juFMZbuivc6fiB2U/bUetwyiV9MmeYF8 X-Received: by 10.223.189.13 with SMTP id j13mr20848128wrh.19.1515705622467; Thu, 11 Jan 2018 13:20:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515705622; cv=none; d=google.com; s=arc-20160816; b=Kj1b6ObueZyBH+6OuD5Z7QGUe2i8YqXyrTScurST7hqn+WPA0PP7K9E94oElqobyZK g0vKueDHQmuWLaLfZeTOfsg5ZEQLGJsu8wnyg973WqstPoJilS+Y4x7YWw/Afvclr1TU Ry+CrzMM0btrn64YeSlUZtLxWtf4qn3oT5enwWLu7C46m//eNLMpPjwuKSo5ZrgXhtK/ IxZA/hp8/KqcGUa5ondvNG2deOv2sfJueDb/cGrmgU8PS9iVRHmwrMbSfwQy/go/kyGh e8Se5YuzTPh4w61buzzCH3/gvax93iaYUCmzzCyfUngeAqzcwzYnNrBADgMzd8Y64KUG usvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:to:date:message-id:mime-version:from :delivered-to:arc-authentication-results; bh=NZg59CiOMmIp2x95h4B9Psq0toa8Lv/KuheB6/f56Pw=; b=V1G0oeqIgTRBCuJwjxUOsGz8dqzOxlHnl/sqaf1SqnO3JL/lyCTLtlafBglZqBSuI9 vfSYtJ5nOGru/addIxBP7SXFPUGATArGAEtgmap1rJkoZw7qwBtyea9/ZdpEOqzYI5RU p5uFYWy8jV5am0gqXfceELecVAGa2T41iTT501Pv9ENt3V88Z2t5b/RRjlDmRADIh5e4 I7IEuMNSPIvxWK2ILw0iVr593iKv/eYqcvqNi9IelTdAcd6TxFMXDEpWOOL4MihZpQE/ 4mS1yyo5R2UlHjym3MUHYiIzyVagLFo1NLJ6oYY4WX8xV6k8awwRpbQjGzdqrvimxWRu Dy4A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id n23si7363851wrb.510.2018.01.11.13.20.22; Thu, 11 Jan 2018 13:20:22 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DB3E6689887; Thu, 11 Jan 2018 23:20:18 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from server172-2.web-hosting.com (server172-2.web-hosting.com [68.65.122.110]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6D435680D52 for ; Thu, 11 Jan 2018 23:20:12 +0200 (EET) Received: from [146.96.19.240] (port=51183 helo=[10.10.201.39]) by server172.web-hosting.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1eZkGg-000qDr-QQ for ffmpeg-devel@ffmpeg.org; Thu, 11 Jan 2018 16:20:12 -0500 From: Dave Rice Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Message-Id: <22E79390-C8BE-487F-A03A-B956C95E3CC8@dericed.com> Date: Thu, 11 Jan 2018 16:20:04 -0500 To: FFmpeg development discussions and patches X-Mailer: Apple Mail (2.3273) X-OutGoing-Spam-Status: No, score=-2.9 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server172.web-hosting.com X-AntiAbuse: Original Domain - ffmpeg.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - dericed.com X-Get-Message-Sender-Via: server172.web-hosting.com: authenticated_id: dave@dericed.com X-Authenticated-Sender: server172.web-hosting.com: dave@dericed.com X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched X-Content-Filtered-By: Mailman/MimeDel 2.1.20 Subject: [FFmpeg-devel] [PATCH] ffmpeg.c: use sigterm_handler with sigpipe X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From 0faa2954010feb8428542fc33aa81e898a280c88 Mon Sep 17 00:00:00 2001 From: Dave Rice Date: Thu, 11 Jan 2018 15:52:36 -0500 Subject: [PATCH] ffmpeg.c: use sigterm_handler with sigpipe Based on a suggestion by Moritz Barsnick at http://ffmpeg.org/pipermail/ffmpeg-user/2018-January/038549.html --- fftools/ffmpeg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 0c16e75ab0..dfcc865dcf 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -406,6 +406,7 @@ void term_init(void) signal(SIGINT , sigterm_handler); /* Interrupt (ANSI). */ signal(SIGTERM, sigterm_handler); /* Termination (ANSI). */ + signal(SIGPIPE, sigterm_handler); /* Termination (pipe closed). */ #ifdef SIGXCPU signal(SIGXCPU, sigterm_handler); #endif