Re: argv0 revisited...

From: DervishD (raul@pleyades.net)
Date: Fri Jan 17 2003 - 05:58:54 EST


    Hi Horst :)

> > some instances of a process called 'init'. The first is an init,
> > true, but the second is the klogd emulator, the third is the slogd
> > emulator and all other are the gettylogin emulator.
> Something like nash that RH uses on their initrd (it is sh, and modprobe,
> and mount, and ...; so they save on libc and random boilerplate code which
> is only once on the disk), or like a package called swish (or something
> like that), that is a shell which has ls, rm, ... builtin?

    I'm afraid that those use symlinks or hardlinks to run every
different personality. What my init does is more or less (no real
code):

    pid=fork();
    if (!pid) do_klog();
    ...
    pid=fork();
    if (!pid) do_slog();

    So, in function do_klog() we would like to change argv[0]. Things
like busybox and the like uses symlinks or mechanisms like 'command
subcommand'.

    I'll give a look at the microdistros, anyway :)) Thanks :)
    Raśl
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



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