From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id B2D5A1F44D for ; Sat, 20 Apr 2024 15:58:52 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; secure) header.d=cs.wisc.edu header.i=@cs.wisc.edu header.a=rsa-sha256 header.s=csl-2018021300 header.b=ZwkNSfgX; dkim-atps=neutral Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 72F4F3858C35 for ; Sat, 20 Apr 2024 15:58:50 +0000 (GMT) Received: from smtpout2.cs.wisc.edu (smtpout2.cs.wisc.edu [128.105.6.54]) by sourceware.org (Postfix) with ESMTPS id F04DE3858D34 for ; Sat, 20 Apr 2024 15:58:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F04DE3858D34 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=cs.wisc.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cs.wisc.edu ARC-Filter: OpenARC Filter v1.0.0 sourceware.org F04DE3858D34 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=128.105.6.54 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713628712; cv=none; b=Pb22odmgcNrNn+gwyms/QrOAVHYyEl05TsrVzKA5t8xhs5VWtM5Fw28/ohr4nsI/Gb/nwFn91h5oIUFKzDaodOOoLjQY1GBNxfXu4MLIqtg7pd2y6/I9+nkWT2N5RRk57zal+rdiSPTFkpyztXsmo0bqbqaIsTbzk/lIvpGWo4A= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713628712; c=relaxed/simple; bh=ElfCzGznsGGbXNsZjUKu2+XzlLa2+HN5UR77VzMzvqg=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=Y6/UwdbfVE+zCAwx8z361RU4JueoZpQltijn+q9UXTEkroXSVreCGV+jmwWMj2zJmzrf2fQHx5lOwucWn982Gzw29TErrlrEr4Ws38dqdHbtTMXIx72cG6bKC1EgPbkUZsqdV9yUyCwkz6r223/OYNvVN5wVr+KkUKORkBqdhGc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from alumni.cs.wisc.edu (alumni.cs.wisc.edu [128.105.2.11]) by flint.cs.wisc.edu (8.14.7/8.14.4) with ESMTP id 43KFwIxD007166; Sat, 20 Apr 2024 10:58:20 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 flint.cs.wisc.edu 43KFwIxD007166 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.wisc.edu; s=csl-2018021300; t=1713628702; bh=QviVveERw9BOVUYmW7V4e/0LCIiJ8oW03cm77zSxJXQ=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=ZwkNSfgXZmn627TSbGvT9kgr/L4FJjvSe2NChAyc3mYdVYuKAkq1OxsoXNVy21CCD zvj8AptX5pIRtHnjbJjrnAh9Vfpp9pukJzFLrtshs97anCZ8L9bN51/R74Zc+pG6xY XXNPIsBFoG2Gccyjw8orzLfJBCBMK56btJq2U4LuDRO8G3TbkQ3/yJ2xaV3g3tZklu 0J4ROtZYieRCvS/TV/letG3SzxcqJ8aGzk5c4q+5H3YvuWC9owgMOpwwM6RnatKdDo JbDEqP4i6X0f0uoVctAe9k9hCFNL9eUa3pW8kZPw95rd/E4Ktfy6u3R47JDWUufg+Q sfXLKNnHue7Zg== Received: from localhost (localhost.localdomain [127.0.0.1]) by alumni.cs.wisc.edu (Postfix) with ESMTP id 788831E083B; Sat, 20 Apr 2024 10:58:18 -0500 (CDT) Date: Sat, 20 Apr 2024 11:00:05 -0500 (CDT) From: Carl Edquist To: Zachary Santer cc: libc-alpha@sourceware.org, coreutils@gnu.org, =?utf-8?Q?P=C3=A1draig_Brady?= Subject: Re: Modify buffering of standard streams via environment variables (not LD_PRELOAD)? In-Reply-To: Message-ID: <12e70177-d115-3c0d-0603-635a14d032f1@cs.wisc.edu> References: <9831afe6-958a-fbd3-9434-05dd0c9b602a@draigBrady.com> <317fe0e2-8cf9-d4ac-ed56-e6ebcc2baa55@cs.wisc.edu> <8c490a55-598a-adf6-67c2-eb2a6099620a@cs.wisc.edu> <8d26e5046cc8bf49490e4aa3f6c00b09@kylheku.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=-146376107526100705317136288058892 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---146376107526100705317136288058892 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8BIT On Thu, 18 Apr 2024, Zachary Santer wrote: > On Wed, Mar 20, 2024 at 4:54 AM Carl Edquist wrote: >> >> However, if stdbuf's magic env vars are exported in your shell (either >> by doing a trick like 'export $(env -i stdbuf -oL env)', or else more >> simply by first starting a new shell with 'stdbuf -oL bash'), then >> every command in your pipelines will start with the new default >> line-buffered stdout. That way your line-items from build.sh should get >> passed all the way through the pipeline as they are produced. > > Finally had a chance to try to build with 'stdbuf --output=L --error=L > --' in front of the build script, and it caused some crazy problems. For what it's worth, when I was trying that out msys2 (since that's what you said you were using), I also ran into some very weird errors when just trying to export LD_PRELOAD and _STDBUF_O to what stdbuf -oL sets. It was weird because I didn't see issues when just running a command (including bash) directly under stdbuf. I didn't get to the bottom of it though and I don't have access to a windows laptop any more to experiment. Also I might ask, why are you setting "--error=L" ? Not that this is the problem you're seeing, but in any case stderr is unbuffered by default, and you might mess up the output a bit by line buffering it, if it's expecting to output partial lines for progress or whatever. Carl ---146376107526100705317136288058892--