From patchwork Thu Jun 8 12:23:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 773018 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wk4Mr58gSz9s71 for ; Thu, 8 Jun 2017 22:23:36 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3wk4Mr44CBzDqLD for ; Thu, 8 Jun 2017 22:23:36 +1000 (AEST) X-Original-To: slof@lists.ozlabs.org Delivered-To: slof@lists.ozlabs.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3wk4Mn359pzDqFH for ; Thu, 8 Jun 2017 22:23:33 +1000 (AEST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B44D87E9DF for ; Thu, 8 Jun 2017 12:23:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B44D87E9DF Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=thuth@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com B44D87E9DF Received: from thh440s.redhat.com (ovpn-116-59.ams2.redhat.com [10.36.116.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1CB658B56B for ; Thu, 8 Jun 2017 12:23:29 +0000 (UTC) From: Thomas Huth To: slof@lists.ozlabs.org Date: Thu, 8 Jun 2017 14:23:29 +0200 Message-Id: <1496924609-19378-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 08 Jun 2017 12:23:30 +0000 (UTC) Subject: [SLOF] [PATCH] paflof: Print stack warning to stderr, not stdout X-BeenThere: slof@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Patches for https://github.com/aik/SLOF" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "SLOF" Now that stdout is routed through the TYPE Forth word, we should avoid using stdout in critical sections in the engine() function. So print the stack warning via stderr now instead. Signed-off-by: Thomas Huth --- slof/paflof.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slof/paflof.c b/slof/paflof.c index 5c4f4e1..50b4adf 100644 --- a/slof/paflof.c +++ b/slof/paflof.c @@ -90,7 +90,7 @@ long engine(int mode, long param_1, long param_2) } if ((char *)&ip < the_system_stack && !did_stackwarning) { - puts("ERROR: stack overflow in engine()!"); + fprintf(stderr, "\nERROR: stack overflow in engine()!\n"); did_stackwarning = 1; }