Re: POSIX environ variable

2024-11-05 Thread Ville Juven
red by the process and all its threads. -Ville From: Gregory Nutt Sent: Tuesday, November 5, 2024 3:35 PM To: dev@nuttx.apache.org Subject: Re: POSIX environ variable On 11/5/2024 6:57 AM, Ville Juven wrote: > For direct user level access, one option

Re: POSIX environ variable

2024-11-05 Thread Gregory Nutt
On 11/5/2024 6:57 AM, Ville Juven wrote: For direct user level access, one option is to move tg_envp to TLS / task_info_s. This way the user could access the memory without boring a hole into the kernel. The same environ is used by all threads in a task group/process. If one thread changes t

Re: POSIX environ variable

2024-11-05 Thread Ville Juven
ution. -Ville From: Gregory Nutt Sent: Tuesday, November 5, 2024 2:39 PM To: dev@nuttx.apache.org Subject: Re: POSIX environ variable On 11/5/2024 3:43 AM, Takashi Yamamoto wrote: > i guess it's possible to implement it similarly to what we do for errno. > > eg. > # defi

Re: POSIX environ variable

2024-11-05 Thread Gregory Nutt
On 11/5/2024 3:43 AM, Takashi Yamamoto wrote: i guess it's possible to implement it similarly to what we do for errno. eg. # define environ (*get_environ_ptr_ptr()) although it still isn't quite posix compatible, it might be good enough for many applications. d18be28c82a2a6d82115c8af19d/shel

Re: POSIX environ variable

2024-11-05 Thread Takashi Yamamoto
i guess it's possible to implement it similarly to what we do for errno. eg. # define environ (*get_environ_ptr_ptr()) although it still isn't quite posix compatible, it might be good enough for many applications. whatever approach we take, it probably requires some extra validations in the ker

POSIX environ variable

2024-11-05 Thread Marco Casaroli
Hello, I am sorry if this was already discussed before. I could not find concrete information in the documentation or the mailing list history. According to POSIX specifications [1]: > The array is pointed to by the external variable environ, which is defined as: > > extern char **environ; But