Re: a quick question
From: xi zhao (xizha_at_cisco.com)
Date: 08/20/04
- Next message: Måns Rullgård: "Re: Segmentation fault with simple code snippet"
- Previous message: Ron Hardin: "Re: Segmentation fault with simple code snippet"
- Next in thread: moma: "Re: a quick question"
- Reply: moma: "Re: a quick question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 20 Aug 2004 14:55:50 -0700
sorry, pls ignore it, it is my mistaken...
xi zhao wrote:
> extern char ** environ;
> main()
> {
> char **eval;
> eval = environ;
>
> setenv("LD_LIB_PATH","/root",1);
> printf("the new env is :%s \n",getenv("LD_LIB_PATH"));
>
> while(*eval) printf("%s\n",*eval++);
>
> getchar();
> }
>
>
> how come there is no LD_LIB_PATH in my while loop of printf even though
> i called setenv/putenv?
>
> thanks a lot!
>
- Next message: Måns Rullgård: "Re: Segmentation fault with simple code snippet"
- Previous message: Ron Hardin: "Re: Segmentation fault with simple code snippet"
- Next in thread: moma: "Re: a quick question"
- Reply: moma: "Re: a quick question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]