The branch stable/15 has been updated by des:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=47bd3d45ee1ec463bf58755040b6ada0201ac25a

commit 47bd3d45ee1ec463bf58755040b6ada0201ac25a
Author:     Dag-Erling Smørgrav <[email protected]>
AuthorDate: 2026-02-25 21:12:36 +0000
Commit:     Dag-Erling Smørgrav <[email protected]>
CommitDate: 2026-03-04 14:45:00 +0000

    system(3): Clarify return values
    
    Our manual page currently states that system() will return 127 if it
    fails to execute the shell.  The actual return value is, to quote POSIX,
    “as if the command language interpreter had terminated using exit(127)
    or _exit(127)”.
    
    MFC after:      1 week
    Sponsored by:   Klara, Inc.
    Reviewed by:    bnovkov, kevans
    Differential Revision:  https://reviews.freebsd.org/D55483
    
    (cherry picked from commit 7305604b29d3db29c9bb5de6e7a25829fb541d1e)
---
 lib/libc/stdlib/system.3 | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/libc/stdlib/system.3 b/lib/libc/stdlib/system.3
index 119432342f70..f09577099a5c 100644
--- a/lib/libc/stdlib/system.3
+++ b/lib/libc/stdlib/system.3
@@ -29,7 +29,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd January 11, 2024
+.Dd February 24, 2026
 .Dt SYSTEM 3
 .Os
 .Sh NAME
@@ -77,8 +77,10 @@ or \-1 if an error occurred when invoking
 .Xr fork 2
 or
 .Xr waitpid 2 .
-A return value of 127 means the execution of the shell
-failed.
+If the child process fails to execute the shell, it will terminate
+with an exit code of 127 and
+.Nm
+will return the corresponding exit status.
 .Sh SEE ALSO
 .Xr sh 1 ,
 .Xr execve 2 ,

Reply via email to