This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit ce49c80976effe16eb0977635ce45b775c983ff4
Author: Xiang Xiao <[email protected]>
AuthorDate: Wed Apr 20 21:45:45 2022 +0800

    sched/task: Correct the comment about environment variable
    
    Signed-off-by: Xiang Xiao <[email protected]>
---
 sched/task/task_posixspawn.c | 10 ++--------
 sched/task/task_spawn.c      |  3 ++-
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/sched/task/task_posixspawn.c b/sched/task/task_posixspawn.c
index 6368a85511..cb7f78d51c 100644
--- a/sched/task/task_posixspawn.c
+++ b/sched/task/task_posixspawn.c
@@ -276,12 +276,8 @@ static int nxposix_spawn_proxy(int argc, FAR char *argv[])
  *     array of pointers to null-terminated strings. The list is terminated
  *     with a null pointer.
  *
- *   envp - The envp[] argument is not used by NuttX and may be NULL.  In
- *     standard implementations, envp[] is an array of character pointers to
- *     null-terminated strings that provide the environment for the new
- *     process image. The environment array is terminated by a null pointer.
- *     In NuttX, the envp[] argument is ignored and the new task will simply
- *     inherit the environment of the parent task.
+ *   envp - envp[] is an array of character pointers to null-terminated
+ *     strings that provide the environment for the new process image.
  *
  * Returned Value:
  *   posix_spawn() and posix_spawnp() will return zero on success.
@@ -297,8 +293,6 @@ static int nxposix_spawn_proxy(int argc, FAR char *argv[])
  *     depending upon the setting of CONFIG_LIBC_ENVPATH: If
  *     CONFIG_LIBC_ENVPATH is defined, then only posix_spawnp() behavior
  *     is supported; otherwise, only posix_spawn behavior is supported.
- *   - The 'envp' argument is not used and the 'environ' variable is not
- *     altered (NuttX does not support the 'environ' variable).
  *   - Process groups are not supported (POSIX_SPAWN_SETPGROUP).
  *   - Effective user IDs are not supported (POSIX_SPAWN_RESETIDS).
  *   - Signal default actions cannot be modified in the newly task executed
diff --git a/sched/task/task_spawn.c b/sched/task/task_spawn.c
index 6374a6e873..7f79c941ad 100644
--- a/sched/task/task_spawn.c
+++ b/sched/task/task_spawn.c
@@ -292,7 +292,8 @@ static int nxtask_spawn_proxy(int argc, FAR char *argv[])
  *     array of pointers to null-terminated strings. The list is terminated
  *     with a null pointer.
  *
- *   envp - The envp[] argument is not used by NuttX and may be NULL.
+ *   envp - envp[] is an array of character pointers to null-terminated
+ *     strings that provide the environment for the new process image.
  *
  * Returned Value:
  *   task_spawn() will return process ID of new task on success.

Reply via email to