Corresponding system.3p already mentions that. Tested with glibc and musl. --- man3/system.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man3/system.3 b/man3/system.3 index 74882fa..32a4a86 100644 --- a/man3/system.3 +++ b/man3/system.3 @@ -82,7 +82,7 @@ or 0 if no shell is available. .IP * If a child process could not be created, or its status could not be retrieved, -the return value is \-1. +the return value is \-1 and errno is set to indicate the error. .IP * If a shell could not be executed in the child process, then the return value is as though the child shell terminated by calling -- 2.9.0