[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: Equivalence of GetCommandLine() in Linux.
On Tue, Nov 21, 2000 at 04:36:24PM +0530, Saravanan Subbiah wrote:
> I don't want to force the users of the shared library to call
> explicitly a set method ,say SetCommandLine, with argc and argv,
> before using the shared library. Also I don't have the flexibility
> of changing the function parameters to take argc and argv.
> Any help is highly appreciated.
AFAIK, argc, argv live on the stack in Linux's glibc and are not
copied into global variables. For a definitive answer, look at
the sources for crt.o in glibc.
One option would be to modify the C runtime code to copy stuff
into global variables. But then your stuff won't work on "standard"