Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
重複の可能性: putenv() と setenv() に関する質問
ご存知のように、関数setenvとputenvを使用して環境変数を変更できます。これらの違いは何ですか? メモリを割り当てる必要がありますか?
どうもありがとう。
setenvのmanページから:
setenv
setenv() name がまだ存在しない場合、この 関数は変数 name を値 value とともに環境に追加します。name が環境に存在する場合、overwrite がゼロでない場合、その値は value に変更されます。overwrite がゼロの場合、name の値は変更されません。この関数は、名前と値が指す文字列のコピーを作成します ( とは対照的putenv(3)です)。
setenv()
putenv(3)
また、この.