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.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, 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 36DCC1F461 for ; Sun, 10 Mar 2024 15:30:04 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=Rmt79GfX; dkim-atps=neutral Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 586E73858298 for ; Sun, 10 Mar 2024 15:30:02 +0000 (GMT) Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by sourceware.org (Postfix) with ESMTPS id BF4153858C50 for ; Sun, 10 Mar 2024 15:29:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BF4153858C50 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BF4153858C50 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::134 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710084584; cv=none; b=YZ/TZZOjkVNc8iaddje2z+r7atQRXiy7SDDfUXY2gvyLdgjUZpSI7MEjJ9Y3mp1YytBZjfCF7hDoY69JpcMAk9cajidzk9zU+Adtk41KyJUt1TVCzSrcoVTIHf2/7y91oQWugOp0LswkWgF4pfOZKcdKoqwAbbqQTvfwM7G+X4Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710084584; c=relaxed/simple; bh=bsWMws2hDABu3Q9Dce8QGtbL2lFbGex+ThzJ4YordWc=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=YIu3MyQuGmFL4JBZ5a55sXLan9a1aqlLR3iLkB1SF0ruk9MC5IkimcO9pa9ibBiRhZPqQUHJ5DS5TQOaQKFB3O40vcgfXYPikA1rQy1aNHBFoytuv5YFKI6bX1iL73KZk7goFENc3ac7BdmyBaAGkwSnL+wFkL8hDVsF4Jy267o= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-51336ab1fb7so2878385e87.1 for ; Sun, 10 Mar 2024 08:29:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710084580; x=1710689380; darn=sourceware.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=bsWMws2hDABu3Q9Dce8QGtbL2lFbGex+ThzJ4YordWc=; b=Rmt79GfXTWz+4h0U2b4sZLRLIIyJM1G86dwlikuovY1LtDYlqCGNJ/ICla7f91xeuh SWg8EnBwQWH1SK3i5P6OOvCWn5F4Tic2huqcVs+jaExQGYUr/PziVgJ4kPFDPHcVt+ML QKLSVF755JS8btMMYTGaXciMOxv6hsITdLewbjK/0LEwlpNX98gODlaOpYPhPff5lIjk ZutqKdkGB4o4YgbbOnx/wPrKxGuXHYLo1wUaHIGiHAHC8jJa5NyAhc92UtfaNkra6e8i Y9/2c/+S4CYWNVCoIsm8K0I5p1GUbjACNNZ8DDdATFv6fAddO8S8u+yb9dbaxE78ckzN 7Lrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710084580; x=1710689380; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bsWMws2hDABu3Q9Dce8QGtbL2lFbGex+ThzJ4YordWc=; b=jW5Bzrr+lqrsscKP9wax9XOSOfaVBHzs2VlWSp3rFTNTOiYpOoMne4UYnWD7EFDtDm bhWhgmZfo2awkLF/cZqOOttpYryqEslshaWdrb2jthqrnCnPTDTP5w3974fvOulatm/8 tWQadHbpvqEvjMBhXOKWixP9RDLw+dE35RzK7FrBROnZIpB1dqSpTWPunAagijyFMqYX ey6YS14KAnOZsLjMteWdLpDLVGWURbAL/QIkzez0Y9asmkEboh44Ax/tq4FjT4zRLaS/ +zKolbj3Tr8LKFBNN3wRBrKb5UAYluDTwHKCgWEwEzj1uEOupJHhQ3OLM1Xlc9DPKLv4 lJew== X-Gm-Message-State: AOJu0YyCZulZneXWQewbHf9mR177nfxGyulzT7FK6Uj6UgOuwpw5SPeL iSIhavTrucbhskrVLDwPoxHzPLG3+jhBSxYFS/4mFzdeKNlrQfxIUxpSoOmF9umt6tSmyGMsc9T DJamAnaUF+FTmK/yVpiVVuL4nTm8jvJQSkw4= X-Google-Smtp-Source: AGHT+IFVOCEC7GQYKz9LUb/77tZVhUH/Y7xZ030yMJ3ihYqiFd8gi4FNPOY1tOEq9otK3jkpILrwknj78vBfuG/DggQ= X-Received: by 2002:a19:e04a:0:b0:512:c985:4890 with SMTP id g10-20020a19e04a000000b00512c9854890mr2597824lfj.67.1710084579734; Sun, 10 Mar 2024 08:29:39 -0700 (PDT) MIME-Version: 1.0 References: <9831afe6-958a-fbd3-9434-05dd0c9b602a@draigBrady.com> In-Reply-To: <9831afe6-958a-fbd3-9434-05dd0c9b602a@draigBrady.com> From: Zachary Santer Date: Sun, 10 Mar 2024 11:29:28 -0400 Message-ID: Subject: RFE: enable buffering on null-terminated data To: libc-alpha@sourceware.org Cc: coreutils@gnu.org, p@draigbrady.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Was "stdbuf feature request - line buffering but for null-terminated data" See below. On Sun, Mar 10, 2024 at 5:38=E2=80=AFAM P=C3=A1draig Brady wrote: > > On 09/03/2024 16:30, Zachary Santer wrote: > > 'stdbuf --output=3DL' will line-buffer the command's output stream. > > Pretty useful, but that's looking for newlines. Filenames should be > > passed between utilities in a null-terminated fashion, because the > > null byte is the only byte that can't appear within one. > > > > If I want to buffer output data on null bytes, the closest I can get > > is 'stdbuf --output=3D0', which doesn't buffer at all. This is pretty > > inefficient. > > > > 0 means unbuffered, and Z is already taken for, I guess, zebibytes. > > --output=3DN, then? > > > > Would this require a change to libc implementations, or is it possible = now? > > This does seem like useful functionality, > but it would require support for libc implementations first. > > cheers, > P=C3=A1draig