[PATCH] sln: Install as a hard link to ldconfig
Florian Weimer
fweimer@redhat.com
Tue Aug 2 10:04:00 GMT 2016
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
More information about the Libc-alpha
mailing list