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=-0.9 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 B4BEB1F44D for ; Tue, 19 Mar 2024 05:25:13 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8BF463858C78 for ; Tue, 19 Mar 2024 05:25:12 +0000 (GMT) Received: from mailfe1.novus.ca (mx1.novus.ca [216.19.176.14]) by sourceware.org (Postfix) with ESMTP id 109AC3858404 for ; Tue, 19 Mar 2024 05:24:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 109AC3858404 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=kylheku.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=novus.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 109AC3858404 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=216.19.176.14 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710825895; cv=none; b=GeJ18TFcpSg9dS8QGUstxtO41VcVxLl0jpbaKCUF3IE3SqmYY6topqQ1ICztsYsVNlgDoOe/aZH8qfKv/fOZf2Ssmq7cj/g5y1pY9oLcmiJLj9ahggfzN8MZXyJg49a7ltWyX2CxAQR6jOA1vCC2wVpyQMP8f+He83Z/MAtNid4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710825895; c=relaxed/simple; bh=CBNfhtEMkgN5MaBibgSplTqvWMO0MbXSK6LCj4E9DYU=; h=MIME-Version:Date:From:To:Subject:Message-ID; b=W1NIHQ1cL99A11uoyCopj8vD6dgIDBhNT2p2nUmypBa6h8CXUm4fst0chkINxKbc41rrfLPo6PhJ0UzBtkwUnwfRW3ZYNR7s5vtN7w3AgXSNPnlTTdUmdh1EZz2BJ0cDN+x2RFWhCpdlUsuhNl6VsWnWa0DkOd5p4/USr2JryH4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: (qmail 994756 invoked from network); 19 Mar 2024 05:24:52 -0000 Received: from 104-37-63-7.dyn.novuscom.net (HELO kylheku.com) (fuck.telus@novus.ca@104.37.63.7) by mailfe1.novus.ca with (TLS_AES_256_GCM_SHA384 encrypted) SMTP (0308a3b0-e5b1-11ee-ad90-005056953255); Mon, 18 Mar 2024 22:24:52 -0700 Received: from localhost.localdomain ([127.0.0.1] helo=mail.kylheku.com) by kylheku.com with esmtp (Exim 4.94.2) (envelope-from ) id 1rmRxy-00Awf3-Kz; Mon, 18 Mar 2024 22:24:50 -0700 MIME-Version: 1.0 Date: Mon, 18 Mar 2024 22:24:25 -0700 From: Kaz Kylheku To: Zachary Santer Cc: Carl Edquist , libc-alpha@sourceware.org, coreutils@gnu.org, p@draigbrady.com Subject: Re: RFE: enable buffering on null-terminated data In-Reply-To: References: <9831afe6-958a-fbd3-9434-05dd0c9b602a@draigBrady.com> <317fe0e2-8cf9-d4ac-ed56-e6ebcc2baa55@cs.wisc.edu> <8c490a55-598a-adf6-67c2-eb2a6099620a@cs.wisc.edu> User-Agent: Roundcube Webmail/1.4.15 Message-ID: <8d26e5046cc8bf49490e4aa3f6c00b09@kylheku.com> X-Sender: kaz@kylheku.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-MagicMail-OS: Unknown X-MagicMail-UUID: 0308a3b0-e5b1-11ee-ad90-005056953255 X-MagicMail-Authenticated: fuck.telus@novus.ca X-MagicMail-SourceIP: 104.37.63.7 X-MagicMail-RegexMatch: 1 X-MagicMail-EnvelopeFrom: 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 On 2024-03-17 17:12, Zachary Santer wrote: > On Thu, Mar 14, 2024 at 11:14 AM Carl Edquist wrote: > >> Where things get sloppy is if you add some stuff in a pipeline after your >> build script, which results in things getting block-buffered along the >> way: >> >> $ ./build.sh | sed s/what/ever/ | tee build.log >> >> And there you will definitely see a difference. > > Sadly, the man page for stdbuf specifically calls out tee as being > unaffected by stdbuf, because it adjusts the buffering of its standard > streams itself. The script I mentioned pipes everything through tee, > and I don't think I'm willing to refactor it not to. Ah well. But what tee does is set up _IONBF on its output streams, including stdout.