Author: Stan Eisenstat
Subject: Re: [Cs323] Creating the env for the child process
Date: Tuesday, 24 Nov 2020, 18:16:23
> Message Posted By: Unknown ... > What is a good way to handle adding new env variables when executing a > child process? Since the array passed into the exec functions must be > static, reallocing envp[] doesn't seem like an option. > > is the only way to make a new static array each time and copy stuff around? As stated in the specification: 7. To use getenv(), setenv(), or putenv() to get or set environment variables, you must first #define _GNU_SOURCE since they are not part of the ANSI Standard. --Stan-PREV INDEX NEXT