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 [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 92A423959E4B for ; Wed, 4 Aug 2021 20:00:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 92A423959E4B Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-235-FXBpVeOuPPWRZf2Zsyj2cg-1; Wed, 04 Aug 2021 16:00:19 -0400 X-MC-Unique: FXBpVeOuPPWRZf2Zsyj2cg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id ED65E94EE2 for ; Wed, 4 Aug 2021 20:00:18 +0000 (UTC) Received: from greed.delorie.com (ovpn-112-6.rdu2.redhat.com [10.10.112.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B359F18432 for ; Wed, 4 Aug 2021 20:00:18 +0000 (UTC) Received: from greed.delorie.com.redhat.com (localhost [127.0.0.1]) by greed.delorie.com (8.15.2/8.15.2) with ESMTP id 174K0HeT1037189 for ; Wed, 4 Aug 2021 16:00:17 -0400 Date: Wed, 04 Aug 2021 16:00:17 -0400 Message-Id: From: DJ Delorie To: libffi-discuss@sourceware.org Subject: is fork() supported? X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="US-ASCII" X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libffi-discuss@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libffi-discuss mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Aug 2021 20:00:22 -0000 I don't mean fork/exec (duh) but a fork() and keep going... Consider a case where a process is using a file-backed mapping for closures; a fork() doesn't isolate that backing between parent/child so there's a chance (for example) the parent could deallocate a closure that the child needs, etc... I see four options... 1. Not supported. Sorry. 2. Supported only if you have fork-able closure backings (mmap or maybe ktmpfile, but not file-backed) but this means documenting that (at least) selinux settings might affect this. Caveat Programmer. 3. Some API that says "I need this" so it can fail in a more useful way than "segfault". 4. Fully supported, and we have some work to do to handle fork events. Comments? DJ