Handling argc==0 in the kernel
Handling argc==0 in the kernel
Posted Jan 28, 2022 20:14 UTC (Fri) by khim (subscriber, #9252)In reply to: Handling argc==0 in the kernel by ariadne
Parent article: Handling argc==0 in the kernel
Note that while, at one time, both C standard and POSIX allowed argc == 0 both are fixed now and POSIX, in fact, says that explicitly to remove any shadow of doubt:
exec function, thus guaranteeing that argc be one or greater when invoked by such an application.
So yes, it's a mess, kinda, because yes, old standards explicitly allowed this, but these standards were fixed.
Whether Linux can or should take advantage of that change is another story, of course.
