From nobody Thu Apr 06 19:04:35 2023 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PsrY05nNxz44jNS for ; Thu, 6 Apr 2023 19:05:08 +0000 (UTC) (envelope-from naddy@mips.inka.de) Received: from mail.inka.de (mail.inka.de [IPv6:2a04:c9c7:0:1073:217:a4ff:fe3b:e77c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PsrY03P1hz4F5f for ; Thu, 6 Apr 2023 19:05:08 +0000 (UTC) (envelope-from naddy@mips.inka.de) Authentication-Results: mx1.freebsd.org; none Received: from mips.inka.de (naddy@[127.0.0.1]) by mail.inka.de with uucp (rmailwrap 0.5) id 1pkUuu-008Hd5-O1; Thu, 06 Apr 2023 21:05:04 +0200 Received: from lorvorc.mips.inka.de (localhost [127.0.0.1]) by lorvorc.mips.inka.de (8.17.1/8.17.1) with ESMTP id 336J4Z40027385; Thu, 6 Apr 2023 21:04:35 +0200 (CEST) (envelope-from naddy@lorvorc.mips.inka.de) Received: (from naddy@localhost) by lorvorc.mips.inka.de (8.17.1/8.17.1/Submit) id 336J4Z5a027384; Thu, 6 Apr 2023 21:04:35 +0200 (CEST) (envelope-from naddy) Date: Thu, 6 Apr 2023 21:04:35 +0200 From: Christian Weisgerber To: Pete Wright Cc: questions@freebsd.org Subject: Re: Clogged pipe? Message-ID: References: <4b563b2a-2c26-8c84-f8db-51e4f17dcaf6@slagle.net> <20230406142604.dug4liknps2zuvvz@shelly.nomadlogic.org> List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230406142604.dug4liknps2zuvvz@shelly.nomadlogic.org> X-Rspamd-Queue-Id: 4PsrY03P1hz4F5f X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:202113, ipnet:2a04:c9c7::/32, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N Pete Wright: > > What actually fixes the buffering problem on FreeBSD (it already works fine > > on Linux) is to add the -u flag to the cat command. > > Jan Schaumann had a great blog post on pipes buffer sizes a while back > that may be interesting: > https://www.netmeister.org/blog/ipcbufs.html That is an entirely different issue. Your problem was due to buffering in libc's stdio implementation. Again: See the DESCRIPTION section of setbuf(3) for a terse summary. -- Christian "naddy" Weisgerber naddy@mips.inka.de