Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6589301imu; Wed, 14 Nov 2018 04:04:57 -0800 (PST) X-Google-Smtp-Source: AJdET5cGANT5XH1POvsuzytXsZIS4wBKNPxzeARr6HQohp/7kFUpw5tU8MAssz/txCCwmgboTchP X-Received: by 2002:a17:902:2ac3:: with SMTP id j61mr1614944plb.185.1542197097562; Wed, 14 Nov 2018 04:04:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542197097; cv=none; d=google.com; s=arc-20160816; b=WSKJ4a19Xx7fbOrP7EU9afKzxonJTOCV74DrSQUS5YsOzN/fcWsrdcWVDC9y7CptYU qwN2VwKaie5wmcWDreqr+XRLEILldVNaGbjNy38XcIquZDEtU+2FNNJgtQ5k9j/T2JhN jJigxzrlTO9Obt6hwdhm5Jh0iz4wVaomsnhSX4WU3VjbE1sFqGDnAFiMrJntinCl8gA2 g4P6XSAUZn899xWuFpUOksl4wEQdJBhA6/VMK9MqPuORgBOf09HexN6964IqD9xsffIS Z1fMlduO7Z4PsiwOZGEBWWXgRWd9Z2PqYIn6iGyW2KX4+GJfq2fndKCfeXbwmipJz/sh uAZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=2XJR6qRbRIEQ3NH2qTv9nx+Zh6MtynaFEGgzwBD2eeE=; b=DlbTx5Krnf8vhqVyPxy5iMmbIzUMkuwAe88oOhDDgLBcdcSoMAr8wod481rBn8veSP bCk67kTeI6CQpGw3phKdG/ao7Jmu5IGkcGZJLxa2CTMFRK3wmxk4S9tlZl8d9GCkSt/q sTv3e3qAH47KnK95DWTGfeWOGyhde7rxWqQcko0+GdS0/cIUTUrWJz2Ue9albsjnNj// rEAt6Oivl+SJkaHnLAEe03YTH4jh0wuKd8jt5XrT4TKcXf0I87ddzRUqMzCs5F+fGOXg NIQlb1/OvPgn9+iclTo91XIPx/HHzz+kxmmqTE6D1HCxN8qsYiZA9L1Y3IxjOMs3xIJ7 ISGw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n18-v6si23319750plp.294.2018.11.14.04.04.26; Wed, 14 Nov 2018 04:04:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732565AbeKNWGw (ORCPT + 99 others); Wed, 14 Nov 2018 17:06:52 -0500 Received: from tartarus.angband.pl ([54.37.238.230]:39630 "EHLO tartarus.angband.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732037AbeKNWGw (ORCPT ); Wed, 14 Nov 2018 17:06:52 -0500 Received: from kilobyte by tartarus.angband.pl with local (Exim 4.89) (envelope-from ) id 1gMttc-0007AF-5A; Wed, 14 Nov 2018 13:03:48 +0100 Date: Wed, 14 Nov 2018 13:03:48 +0100 From: Adam Borowski To: Florian Weimer Cc: Willy Tarreau , "Michael Kerrisk (man-pages)" , Daniel Colascione , linux-kernel , Joel Fernandes , Linux API , Vlastimil Babka , Carlos O'Donell , "libc-alpha@sourceware.org" Subject: Re: Official Linux system wrapper library? Message-ID: <20181114120348.or5id3hzrmltkyvb@angband.pl> References: <20181111081725.GA30248@1wt.eu> <3664a508-ca74-4ff0-39a6-34543194a24e@gmail.com> <20181111111143.GB4189@1wt.eu> <87zhufvntw.fsf@oldenburg.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87zhufvntw.fsf@oldenburg.str.redhat.com> X-Junkbait: aaron@angband.pl, zzyx@angband.pl User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: kilobyte@angband.pl X-SA-Exim-Scanned: No (on tartarus.angband.pl); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Nov 11, 2018 at 12:46:35PM +0100, Florian Weimer wrote: > A lot of multi-threaded applications assume that most high-level > functionality remains usable even after fork in a multi-threaded > process. How would this be even possible? Currently fork kills all threads (save for the caller). Glibc's manpage also warns: # After a fork() in a multithreaded program, the child can safely call only # async-signal-safe functions (see signal-safety(7)) until such time as it # calls execve(2). Which makes sense as its malloc uses a mutex, and you can't take a breath without a library call using malloc somewhere (or in C++, the language itself). So any functionality remaining usable after fork is pretty strictly limited... Meow! -- ⢀⣴⠾⠻⢶⣦⠀ I've read an article about how lively happy music boosts ⣾⠁⢰⠒⠀⣿⡁ productivity. You can read it, too, you just need the ⢿⡄⠘⠷⠚⠋⠀ right music while doing so. I recommend Skepticism ⠈⠳⣄⠀⠀⠀⠀ (funeral doom metal).