From owner-dev-commits-src-all@freebsd.org Thu Sep 9 23:19:40 2021 Return-Path: Delivered-To: dev-commits-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 275ED6790BD for ; Thu, 9 Sep 2021 23:19:40 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (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 4H5FMZ6l6Pz4T8r for ; Thu, 9 Sep 2021 23:19:38 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f53.google.com with SMTP id q11so4843946wrr.9 for ; Thu, 09 Sep 2021 16:19:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=up5+k6OXNOua0WoeJDe5GpZ5xvPYuoEatkZbty/qdlE=; b=csNAykvd0d13N0q3wGdypQMJpGUOQcU4+5Jk2vO7hDBDt5Vu6KVs9ZwLuWV3YprCbX rRrrd/tsogE1ZzlycP+JI9RwMpGldBb7YJmEn64SJ7aIqZxXZ1UnryELEDHGv2iCIq92 t/gGdrVII/Qti0z+IWXl01cWMiqmBEZZZnJ+KIk8FzaYQkG/oj7XDZwwhv9bL3tRbN/o aGAaInqzS437L7skxnMoR6R18WgtCcuK8c4EQyuXWgnDUtAdzvwIbGqXYL9uP3vGTXFe 1KGlDDd9e6xqddg7ZkUeI2YT/F94RyP/u0QPfMZQnXk7Zjwx39fL8MLnkaB/wQnzJUMV dncQ== X-Gm-Message-State: AOAM531ejB4e7A/c5kVMjhV2VGIA5cSZNiiFkbRFBYtJTsT2LaUkQ4Ps sYgzJK/1oWreuSftoFSKiGG13w== X-Google-Smtp-Source: ABdhPJy44DPAFt+ZJB78C4R/IivB1MTiKaAWyVmUecQjCoeOQ1bhIpilYs50rb3PBl+JkRMrlytIZQ== X-Received: by 2002:adf:9f4d:: with SMTP id f13mr6357041wrg.169.1631229571954; Thu, 09 Sep 2021 16:19:31 -0700 (PDT) Received: from smtpclient.apple (global-5-143.nat-2.net.cam.ac.uk. [131.111.5.143]) by smtp.gmail.com with ESMTPSA id l3sm610073wms.4.2021.09.09.16.19.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Sep 2021 16:19:31 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: git: 49ad342cc10c - main - Add _Fork() From: Jessica Clarke In-Reply-To: <202108031819.173IJgPB060470@gitrepo.freebsd.org> Date: Fri, 10 Sep 2021 00:19:30 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <42166E5E-A749-4FC7-A834-8A35D58706EF@freebsd.org> References: <202108031819.173IJgPB060470@gitrepo.freebsd.org> To: Konstantin Belousov X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Rspamd-Queue-Id: 4H5FMZ6l6Pz4T8r X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.221.53 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com X-Spamd-Result: default: False [-2.50 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MID_RHS_MATCH_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FREEFALL_USER(0.00)[jrtc27]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.221.53:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.221.53:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[dev-commits-src-all] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Sep 2021 23:19:40 -0000 On 3 Aug 2021, at 19:19, Konstantin Belousov wrote: >=20 > The branch main has been updated by kib: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D49ad342cc10cba14b3a40ba26cf8bb21= 50e2925a >=20 > commit 49ad342cc10cba14b3a40ba26cf8bb2150e2925a > Author: Konstantin Belousov > AuthorDate: 2021-08-02 09:50:32 +0000 > Commit: Konstantin Belousov > CommitDate: 2021-08-03 18:19:32 +0000 >=20 > Add _Fork() >=20 > Current POSIX standard requires fork() to be async-signal safe. = Neither > our implementation, nor implementations in other operating systems = are, > and practically it is impossible to make fork() async-signal safe = without > too much efforts. Also, that would put undue requirement that all = atfork > handlers should be async-signal safe as well, which contradicts its = main > use. >=20 > As result, Austin Group dropped the requirement, and added a new = function > _Fork() that should be async-signal safe, but it does not call = atfork > handlers. Basically, _Fork() can be implemented as a raw syscall. >=20 > Release of glibc 2.34 added _Fork(), do the same for FreeBSD. > Clarify threading behavior for fork() in the manpage. >=20 > Reviewed by: markj > Sponsored by: The FreeBSD Foundation > MFC after: 2 weeks > Differential revision: https://reviews.freebsd.org/D31378 This breaks the build on case-insensitive filesystems like macOS has, since _Fork.o for this C file and _fork.o for __sys_fork and _fork conflict, leading to either build failures (because _fork.o gets replaced and __sys_fork is undefined) or silently not including _Fork (because _Fork.o gets replaced) in the library, with it being non-deterministic based on whichever order the files happen to be built in, and potentially varying between the three different libraries as the .o, .pico and .nossppico files are independent. Jess