|
|
|
|
||||||
| comp.unix.shell Using and programming the Unix shell. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Does anybody know if there is a limitiation on the length of an
environment variable value. In particular I concerned about Solaris 2.8, 2.9, 2.10 Thanks in advance to all who answer this post |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
2007-07-26, 13:47(-07), Stu:
> Does anybody know if there is a limitiation on the length of an > environment variable value. In particular I concerned about > > Solaris 2.8, 2.9, 2.10 > > Thanks in advance to all who answer this post There's a limit on the combined size of the arguments and environments passed in an execve(). So that incurs a limit on the size of the environment. You find though that most systems won't restrict you to do as many and as big putenv/setenv(3) as you wish, but you'll find then that you can no longer execute other commands. The libc maintains a buffer (allocated dynamically) to store the environment settings done via putenv/setenv, and that buffer is used upon execl/execp/execv/excvp(3) to construct the envp argument to the execve(2) system call. Solaris is known to have a relatively (to other OSes) high limit on that size. Linux was known to have a relatively low one. Hurd is the only one that is known to have no limit at all to my knowledge. -- Stéphane |
|
![]() |
| Outils de la discussion | |
|
|