Why the environment variable is unset after using setenv( )

后端 未结 3 692
野趣味
野趣味 2020-12-20 18:51

I wrote a C program in Linux to set the values of environment variables using setenv, but after execution, when I run set or export, t

3条回答
  •  情歌与酒
    2020-12-20 19:43

    The environment variables are set within the context of your program.

    When your program exits, you're back in the context from where your program was started.

提交回复
热议问题