Handling argc==0 in the kernel
Handling argc==0 in the kernel
Posted Jan 28, 2022 20:20 UTC (Fri) by matthias (subscriber, #94967)In reply to: Handling argc==0 in the kernel by dskoll
Parent article: Handling argc==0 in the kernel
If a callee does not inspect argv[0], then any string is good. If a callee expects some non-empty string as argv[0], then calling with argv pointing to { NULL } does not work today. And there is no reason why it should work tomorrow. Doing anything else than aborting with an error would only be to be backwards compatible with the current situation.
The only reason this could break anything that is working now that I can images is, that some callee actually expects to be called with argc==0 and argv pointing to { NULL }. But this would be really weird.
Posted Jan 30, 2022 21:43 UTC (Sun)
by developer122 (guest, #152928)
[Link]
Handling argc==0 in the kernel