From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by sourceware.org (Postfix) with ESMTPS id 4E3A83858C2C for ; Sat, 30 Oct 2021 11:55:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4E3A83858C2C Received: by mail-wm1-x330.google.com with SMTP id a20-20020a1c7f14000000b003231d13ee3cso13718018wmd.3 for ; Sat, 30 Oct 2021 04:55:57 -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:references:cc:from:in-reply-to :content-transfer-encoding; bh=JILh8eQpv80mWOvoHRLIAZAVINa7YrsbslOFKWDtRz8=; b=wqC7UCOykQef5i+Om5BkOjYDUFfhy9e3B8SwFH9xae73I3ykbyHryhmSXTDgidqhVY f9DPEM3SC5M7XSezn9SJZIxgen9vM4TnyF/xoeeUKaBAkuPy2LiCC8ZJ6TtlaEBO8ai2 J42SCxiHC38Z0D5NPtSeEwuzbV6pWPfAK+jCk3Cev+M+iUie4y/PRKrqHEP+7D/zmr9i XwNUZsHAPy2NnZZdSky7M6EvGgC7t1QwgwhYQN7pxE/x7rCI5GpNVA6Ew52H9Ih2Wppb japUnZCWv6M6vNaxWMCpQTVf0jxfgvCMpdnMGgCddQwJbs+Jwe54R93V5t6g+0MRj8OG Ktdw== X-Gm-Message-State: AOAM532YpC+rkxpAP2lmAP+YJ0+SOQJC/+YMQ1Y4wHfz64RyAWm8I4WK zpL0qz2RJ7fJdKF4PR8OtL/4kXnHDZk= X-Google-Smtp-Source: ABdhPJzX8gHuaqBtYIBtNZazNV2EpVBOOHPR+ylcGwxeBh/Ml5lHJ7e+yIFSLStM6vz65NFNhszSqg== X-Received: by 2002:a7b:cd8a:: with SMTP id y10mr17431109wmj.185.1635594956419; Sat, 30 Oct 2021 04:55:56 -0700 (PDT) Received: from [10.8.0.130] ([195.53.121.100]) by smtp.gmail.com with ESMTPSA id j8sm1716943wrh.16.2021.10.30.04.55.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 30 Oct 2021 04:55:56 -0700 (PDT) Message-ID: Date: Sat, 30 Oct 2021 13:55:54 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Subject: Re: [Bug 214871] New: Man(3) system outdated Content-Language: en-US To: Libc-alpha , Adhemerval Zanella References: Cc: bugzilla-daemon@bugzilla.kernel.org From: "Alejandro Colomar (man-pages)" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, FREEMAIL_REPLY, KAM_SHORT, 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: Sat, 30 Oct 2021 11:55:59 -0000 [CC += Glibc, Adhemerval] Hi Adhemerval, On 10/29/21 22:37, bugzilla-daemon@bugzilla.kernel.org wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=214871 > > Bug ID: 214871 > Summary: Man(3) system outdated > Product: Documentation > Version: unspecified > Hardware: All > OS: Linux > Status: NEW > Severity: normal > Priority: P1 > Component: man-pages > Assignee: documentation_man-pages@kernel-bugs.osdl.org > Reporter: mikekearney85@hotmail.com > Regression: No > > During my recent university work, I have noticed the man (3) page for system > (https://man7.org/linux/man-pages/man3/system.3.html) states: > > The system() library function uses fork(2) to create a child process that > executes the shell command specified in command using execl(3) as follows: > execl("/bin/sh", "sh", "-c", command, (char *) NULL); > > On reading the source code for system, this caused me some confusion. > Eventually I found a commit from 2018 > (https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=5fb7fc96350575c9adb1316833e48ca11553be49), > in which fork and exec were replaced by posix_spawn. The explains why I could > not aline the man page with the source code. > I was about to change that line to say that it works "as if" using fork(2) and execl(3), as POSIX says, but then, reading the page further, it talks about many implementation details that seem to relate to when glibc did actually use fork(2). They may be outdated now, so I think it's better if someone from glibc that knows its current details reviews the full page and proposes changes. Thanks, Alex -- Alejandro Colomar Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/ http://www.alejandro-colomar.es/