Re: argv0 revisited...

From: Rogier Wolff (
Date: Fri Jan 17 2003 - 05:51:03 EST

On Thu, Jan 16, 2003 at 12:27:45PM +0100, DervishD wrote:
> That is, for clarity, those should be 'renamed'. I cannot rename
> the binary, because all them are in the same binary. The only way is
> mangling argv[0] in each fork, that's all. Currently, as I know for

ln init klogd
ln init slog
ln init into

main (...)
   if (strstr (argv[0], "klogd"))
        go_do_klogd ();

This is similar to what busybox uses.


** ** ** +31-15-2600998 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
* The Worlds Ecosystem is a stable system. Stable systems may experience *
* excursions from the stable situation. We are currently in such an      * 
* excursion: The stable situation does not include humans. ***************
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Thu Jan 23 2003 - 22:00:15 EST