|
|
Subscribe / Log in / New account

Handling argc==0 in the kernel

Handling argc==0 in the kernel

Posted Jan 28, 2022 20:07 UTC (Fri) by khim (subscriber, #9252)
In reply to: Handling argc==0 in the kernel by larkey
Parent article: Handling argc==0 in the kernel

You found the right page, just, perhaps, not the right quote. I think that one should close that discussion about meanings of different words:

> The wording, in particular the use of the word should, requires a Strictly Conforming POSIX Application to pass at least one argument to the exec function, thus guaranteeing that argc be one or greater when invoked by such an application.

I don't think explanations can be more clear than that.

You don't need to dig around for strict meanings of different words, authors of the standard did that for you.


to post comments

Handling argc==0 in the kernel

Posted Jan 28, 2022 21:13 UTC (Fri) by larkey (guest, #104463) [Link]

But in what way does this contradict what I say? "should" means that this is a recommendation, i.e., a *strictly* conforming application needs to fulfill this criterion. But POSIX only uses should for argv[0] being the program name, but they use *shall* for argv ≠ NULL. Which is precisely my point. The latter is a *must do*, the former is not as strict as a requirement.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds