This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 07/21/2016 08:22 AM, Mike Frysinger wrote:
On 13 Jul 2016 14:17, Florian Weimer wrote:+/* Check if we have to run sln. */ +bool +run_sln (const char *argv0) +{ + const char *slash = strrchr (argv0, '/'); + const char *progname; + if (slash == NULL) + progname = argv0; + else + progname = slash + 1; + return strcmp (progname, "sln") == 0; +}GNU programming conventions say to not rely on argv[0] to change behavior:
https://www.gnu.org/prep/standards/html_node/_002d_002dversion.html
Can you provide an exact quote? I don't see it. coreutils supports this, and bash pretty much requires looking at argv[0].
Thanks, Florian
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |