The branch stable/13 has been updated by des:

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

commit c1788a925a93223dbd78f8c9988b4a296428b951
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:46:04 +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 7f1a34c69d2d..0b8a677c35b7 100644
--- a/lib/libc/stdlib/system.3
+++ b/lib/libc/stdlib/system.3
@@ -31,7 +31,7 @@
 .\"
 .\"     @(#)system.3   8.1 (Berkeley) 6/4/93
 .\"
-.Dd July 25, 2015
+.Dd February 24, 2026
 .Dt SYSTEM 3
 .Os
 .Sh NAME
@@ -79,8 +79,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