lkml.org 
[lkml]   [2003]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Changing argv[0] under Linux.
    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/

\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.072 / U:0.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site