From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) by sourceware.org (Postfix) with ESMTPS id 39EAF3858D39 for ; Tue, 2 Nov 2021 11:37:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 39EAF3858D39 Received: by mail-qk1-x731.google.com with SMTP id bi29so19271508qkb.5 for ; Tue, 02 Nov 2021 04:37:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=quTVgxO0j+ouZJAW2wGWnm+wJkQcoGOAjZBCL+fotl0=; b=BsHWRcHVROOICAZ5UrrVrcP1/1pro6RXCu9PLf9Ecn+TW2kWtK2Dyc5c38XuXZXMud PUe4tyO30Ym2T71hh7Jpy0+O98p1RoJjvdMLsuu+TIyr5ljKB7xZ3044FwExjYu2qZ9i tg41xaYY/h1QPKKoFuNqytHYVVmq5MX72bd5pYIDeGXn29cyWSBU/Ck2PUWZX81n5EIW w/FsOFX43I0n2BWMsn4L2qbV/Mhv/HqURJgCeOpDNfVUuxYUEDH+wG9H3BUUBBpSlb4u w47mPjrDdwY/Ks1DFTm/ACHd+gTR5cyDX2SJCDooWI4FG/2hn7QuZ6ahaST6olWTLgRY J1vA== X-Gm-Message-State: AOAM531tIxZ2b1For04cGAp6tb6ugjP9GMa+GU7h5ZVXrqkchGA8YSW1 1O4a+tkaMRecMBR/UgUPCafSBw== X-Google-Smtp-Source: ABdhPJxV/1+Mcf/YeXWk7Lm3j18jO7hOK0qKxG1nR6xnBqp/4DF75LACtkpXl8sAydUCn+XRbywvnA== X-Received: by 2002:a05:620a:448f:: with SMTP id x15mr17449475qkp.317.1635853063805; Tue, 02 Nov 2021 04:37:43 -0700 (PDT) Received: from ?IPV6:2804:431:c7cb:b64f:2d14:9d31:3214:afc6? ([2804:431:c7cb:b64f:2d14:9d31:3214:afc6]) by smtp.gmail.com with ESMTPSA id s13sm12608319qki.23.2021.11.02.04.37.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Nov 2021 04:37:43 -0700 (PDT) Message-ID: Date: Tue, 2 Nov 2021 08:37:41 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.2 Subject: Re: [Bug 214871] New: Man(3) system outdated Content-Language: en-US To: "Alejandro Colomar (man-pages)" , zatrazz Cc: bugzilla-daemon@bugzilla.kernel.org, Libc-alpha References: <42f0a401-d223-3b5a-f076-bd033f716aae@gmail.com> From: Adhemerval Zanella In-Reply-To: <42f0a401-d223-3b5a-f076-bd033f716aae@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-14.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Nov 2021 11:37:46 -0000 On 02/11/2021 06:58, Alejandro Colomar (man-pages) via Libc-alpha wrote: > Hi Adhemerval, Michael, > > On 11/1/21 13:06, zatrazz wrote: >> Hi Alejandro, >> >> Indeed we changed glibc to use posix_spawn on system and popen on  2.29 since >> to use posix_spawn (which uses clone (CLONE_VFORK | CLONE_VM)).  It plays >> way better with Linux memory subsystem than fork() + exec() specially when such >> calls are used with process with large RSS. > > I applied the following patch.  I'll close the bug. > > Thanks, > > Alex I forgot to add that neither system(), posix_spawn(), nor popen() call atfork handlers [1]. POSIX recently changed their description to make it implementation-defined instead of unspecified [2], so I think it is worth to change that is not really behave as called by fork() (since it will run atfork handlers). [1] https://sourceware.org/bugzilla/show_bug.cgi?id=17490 [2] https://www.austingroupbugs.net/view.php?id=1317 > > --- >     system.3: It doesn't call fork anymore > >     Reported-by: Michael Kearney >     Cc: Adhemerval Zanella >     Signed-off-by: Alejandro Colomar > > diff --git a/man3/system.3 b/man3/system.3 > index 880fe93c6..bde45ed82 100644 > --- a/man3/system.3 > +++ b/man3/system.3 > @@ -40,9 +40,9 @@ system \- execute a shell command >  .SH DESCRIPTION >  The >  .BR system () > -library function uses > +library function behaves as if it used >  .BR fork (2) > -to create a child process that executes the shell command specified in > +to create a child process that executed the shell command specified in >  .I command >  using >  .BR execl (3) > > >