From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 7EC743858C00 for ; Thu, 23 Feb 2023 22:37:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7EC743858C00 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677191853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lMOvP3vCxUEpd2ImBFDZBsG+nqteBGOR9b4/Dj6rtgg=; b=bcuHgiuTEM08FpwVQnOIyz9mXu8YG5SgaG7uyWNqE4RDg78qQzMzL5AhHemhCXS9nvSZub LQT9+ryhKtwfY1IwG5V/HvKY7TkcaUPiRrIpLFzds3UD3HzxSR5gBqOJNX0eejpe4pFsYu 9djcuCTxJKuvUaJjyQa/nkLQ/VyFX7s= Received: from mail-il1-f198.google.com (mail-il1-f198.google.com [209.85.166.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-115-t5B7D6V6MU2Ufn0K3tGnwA-1; Thu, 23 Feb 2023 17:37:33 -0500 X-MC-Unique: t5B7D6V6MU2Ufn0K3tGnwA-1 Received: by mail-il1-f198.google.com with SMTP id p3-20020a056e02104300b00316f4afe7bfso3059435ilj.5 for ; Thu, 23 Feb 2023 14:37:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=lMOvP3vCxUEpd2ImBFDZBsG+nqteBGOR9b4/Dj6rtgg=; b=wElgUofj9Hwi8wDDHpBuTfR9uiPn3cqRIFQaNMrY7femgwjNTFlVFcRdT2OuzWb4Fr SivabVTCxto8fQOXj2C9vhMgc2UJM4lcpDIuJrmDT1xbAOZd2TxawRCBGeO5grT5cd/w 8YHshZ54Veu3NIvSMz2hpp9aZt0mC4xNIB2goAEQnKP7cCCWaKQ7KMIU3ZKTUOktWACv 9/lUH0qIAG/0a0i3AJTRran4UAvvDhNP87HA1oiywSqvrmLqRxsy1aTXWAGNM5LB4nkb gnq+1G132pIQ4qwFu1ZOulIMNUcpKgil5DcDCCXDSdO+W3x3a1TLVLMKvzrK2s5ecFSo LMWQ== X-Gm-Message-State: AO0yUKUOTZOaRqj5QJ5Z+hJc7h1PbW50Dvd+pyh3Hm0L/4wnEjLrpLOC t4JtKOSweZzZ0G6uRjxB7pMQYC9oHgp7mP7xlgjci9Pg6tAUcnJAxvtueiQ3XuHg36DdPGOYE1k yKiGquwwI9m23FiC/SgvkN4wrpPOiacZQwmgCTwaJCdkYdsKqa/gkeKl/9yyI2hilgTgr9VnKs6 U= X-Received: by 2002:a05:6e02:1a08:b0:316:fd71:d505 with SMTP id s8-20020a056e021a0800b00316fd71d505mr3621789ild.6.1677191851582; Thu, 23 Feb 2023 14:37:31 -0800 (PST) X-Google-Smtp-Source: AK7set+dTnQK8d4vV+pAv+7mREg8kQlTD+nsFui/05sl9Sx6vCQ+blrv3mjgPLJlxxuPPW+zafUjfg== X-Received: by 2002:a05:6e02:1a08:b0:316:fd71:d505 with SMTP id s8-20020a056e021a0800b00316fd71d505mr3621779ild.6.1677191851281; Thu, 23 Feb 2023 14:37:31 -0800 (PST) Received: from athas.localdomain ([198.48.244.52]) by smtp.gmail.com with ESMTPSA id r5-20020a02c845000000b003c4f7c419dasm3521804jao.128.2023.02.23.14.37.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 14:37:30 -0800 (PST) From: Carlos O'Donell To: libc-alpha@sourceware.org, fweimer@redhat.com Cc: Carlos O'Donell Subject: [PATCH v2] manual: Add note to process.texi about MT-process fork (Bug 30159) Date: Thu, 23 Feb 2023 17:37:28 -0500 Message-Id: <20230223223728.423748-1-carlos@redhat.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: The forked child of an MT-process may only call AS-safe functions. --- manual/process.texi | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/manual/process.texi b/manual/process.texi index 9307379194..c712fe3a26 100644 --- a/manual/process.texi +++ b/manual/process.texi @@ -316,6 +316,18 @@ The child doesn't inherit alarms set by the parent process. The set of pending signals (@pxref{Delivery of Signal}) for the child process is cleared. (The child process inherits its mask of blocked signals and signal actions from the parent process.) + +@item +In the case of a multi-threaded parent, the child process may only +safely call asynchronous-signal-safe functions until the process is +replaced with a call to an @code{exec} family function. + +As an extension relative to POSIX, @theglibc{} supports calling +@code{malloc} and other allocation functions after @code{fork}. This +only applies to the standard @code{malloc}. Whether this extension is +supported by replacement @code{malloc} implementations depends on the +replacement. @xref{Replacing malloc}. + @end itemize @deftypefun pid_t _Fork (void) -- 2.39.2