From owner-svn-src-all@freebsd.org Wed Sep 23 18:56:20 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D86B942381F; Wed, 23 Sep 2020 18:56:20 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxS7l6vVfz47cg; Wed, 23 Sep 2020 18:56:19 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: by mail-ej1-f48.google.com with SMTP id q13so1048324ejo.9; Wed, 23 Sep 2020 11:56:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=50S5Joqwhe/Lg4BqCp2K9D7+IADJA1+Sdk90kXKlgMU=; b=Rw9DhexEt/g2DQwantRbWB1zk+htrgHAeZVRnQpnIJ/aLZYwFEPjuJL6szR9VLB2H6 imMauwY3kYfNmKKxhwzIbU33nDE0ai23S81hzISqO3ZueunDvBgG8zX7bpqliFVI3dO/ W2TQ6YXgh+a84X2f2Zy8ftMPMVSJMZ259V2nE+P0cHutK4ne03oBLSAmAiWotjs/yz8o 6z7MfnecPEMNkHJGyvBncdGSwVwQO11yc9pvud7LjEifTpZMQXfgvnN6enFEVupYKVmU +uslL4D+4rMbre7nrubi1NtLH/4NFxY5GRZONAvf8McDYkqqoLz/eNdz1OyQSSqKD//K adSg== X-Gm-Message-State: AOAM530CYbB2QDFnKv/r01OrDJhNkCNAAHb3q8pxaSWL16jz4SxnFNkT wf1EtyTcVqYXlwWg9QmI4S1yrhxGPmplFQ== X-Google-Smtp-Source: ABdhPJxoKzP3x0GUct6kxEFGG0sGC4Q34VH2hNgO5ymZuklyFYwTF/L9W9057ilVUq4QW2/BmDAGQQ== X-Received: by 2002:a17:906:1157:: with SMTP id i23mr1111855eja.440.1600887377452; Wed, 23 Sep 2020 11:56:17 -0700 (PDT) Received: from ?IPv6:2a02:8109:98c0:1bc0:5e5f:67ff:fef4:ffd8? ([2a02:8109:98c0:1bc0:5e5f:67ff:fef4:ffd8]) by smtp.gmail.com with ESMTPSA id bv8sm601010ejb.3.2020.09.23.11.56.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Sep 2020 11:56:16 -0700 (PDT) Subject: Re: svn commit: r365643 - head/bin/cp To: Warner Losh , "Rodney W. Grimes" Cc: Kyle Evans , Alan Somers , Mateusz Guzik , src-committers , svn-src-all , svn-src-head References: <202009231656.08NGujEs042900@gndrsh.dnsmgr.net> From: Mateusz Piotrowski <0mp@FreeBSD.org> Message-ID: <2a7aea44-7522-7238-7d73-70c1c9d549c5@FreeBSD.org> Date: Wed, 23 Sep 2020 20:56:01 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 4BxS7l6vVfz47cg X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mpp302@gmail.com designates 209.85.218.48 as permitted sender) smtp.mailfrom=mpp302@gmail.com X-Spamd-Result: default: False [-1.65 / 15.00]; RCVD_TLS_ALL(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[FreeBSD.org]; ARC_NA(0.00)[]; NEURAL_SPAM_SHORT(0.28)[0.276]; NEURAL_HAM_LONG(-1.01)[-1.011]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCPT_COUNT_SEVEN(0.00)[8]; RCVD_IN_DNSWL_NONE(0.00)[209.85.218.48:from]; NEURAL_HAM_MEDIUM(-0.92)[-0.919]; FORGED_SENDER(0.30)[0mp@FreeBSD.org,mpp302@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.218.48:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[0mp@FreeBSD.org,mpp302@gmail.com]; MAILMAN_DEST(0.00)[svn-src-head,svn-src-all]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2020 18:56:20 -0000 On 9/23/20 7:23 PM, Warner Losh wrote: > On Wed, Sep 23, 2020, 10:56 AM Rodney W. Grimes > wrote: > >>> cp is already fixed, people are still feeling the fallout of being >>> within those revisions and needing to bootstrap their own cp. We can >>> reduce the number of components these invocations rely on trivially to >>> shell built-in mechanics, why not do so? >> I would even go further, I would like to see the dependency on >> /dev/null removed from the build, and the boot process. >> > A worthy goal, but one I'm afraid is out of our reach. A quick grep shows > just over 200 instances of /dev/null in the Makefile and mk file (800 if > you don't filter Makefile.in and Makefile.am). Maybe a third of those are > due to tests and other false positives. It would be quite the effort to > eliminate them all. And /dev/tty and /dev/zero likely will be troublesome > too, as they are used by running programs. > > and how would you throw away output you know is bad / bogus without > /dev/null? I wonder if we could do it (at least in some cases) by closing descriptors with 1<&- and/or 2<&-. > From the build because it means I would no longer have to >> mount /dev in my chroots, and from the boot because I >> hate to say it, but we often scribble in /dev before >> devfs is mounted and if you look at root file systems >> mounted on other systems you well often find a /dev/null >> FILE that got created during the boot process from a >/dev/null >> before devfs was mounted. >> > But for this issue, we're not mounting devfs early enough. We should fix > that. Removing /dev/null from the boot process likely is never going to > happen because we use it all over the place to discard output... There's > ~200 instances of it in the boot rc scripts, so getting rid of it there > would also be quite the effort, with the same question.