[PATCH 2/2] linux: posix_spawn: return EINVAL on argc < 1

Cristian Rodríguez crrodriguez@opensuse.org
Sat Jan 29 01:04:40 GMT 2022


On Fri, Jan 28, 2022 at 8:49 PM Joseph Myers <joseph@codesourcery.com> wrote:

> Errors for argc == 0 (with argv != NULL) are contrary to POSIX, which
> allows that case other than for Strictly Conforming POSIX Applications,

The case you mention as valid are rejected by BSDs.. QNX and others.
so portable applications cannot rely on this either.
.
freebsd head and openbsd -EINVAL with argc == 0 and has never allowed
argv to be NULL  (EFAULTs)


More information about the Libc-alpha mailing list