Re: Changing argv[0] under Linux.

DervishD (raul@pleyades.net)
Wed, 15 Jan 2003 17:57:53 +0100


Hi Richard :)

> Well, I just can't give this up!

It's an interesting issue ;)))

> If you don't like me pretending that main() gets the environment
> after args[], you can access environ directly anyway with the
> same result. Have fun!

Anyway, I'm not sure that all argv members are contiguous. I
mean, you can have argv[0] at 0x0c123456, length 3, and argv[1] not
at 0x0c123459, but at 0xdeadbeaf. I know, this is VERY improbable,
but argv is just an array of strings :((

Anyway this code is brilliant ;)) Nice solution :)
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/