Hi, On Wed, 6 Feb 2008, Johannes Sixt wrote:That might be a shortcoming of our implementation of setenv(): -- snip -- cd /git cat > a1.c << EOF #include <stdio.h> #include "compat/setenv.c" #include "compat/unsetenv.c" static void p() { const char *abc = getenv("ABC"); printf("env ABC: %s\n", abc ? abc : "(null)"); } int main() { p(); gitsetenv("ABC", "Hello", 1); p(); gitsetenv("ABC", "", 1); p(); gitunsetenv("ABC"); p(); return 0; } EOF gcc -DNO_MMAP=1 -I. -Icompat -o a1.exe a1.c ABC="" ./a1.exe -- snap -- This will show env ABC: env ABC: Hello env ABC: (null) env ABC: (null) So it seems that environment variables _can_ be empty. Just our relatively stupid implementation of setenv() does not do it. Maybe something like compat/unsetenv.c is needed in setenv(), too. Ciao, Dscho - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| debian developer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Vu Pham | Re: [Scst-devel] Integration of SCST in the mainstream Linux kernel |
| Adrian Bunk | Re: Linux 2.6.21 |
git: | |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Radu Rendec | Endianness problem with u32 classifier hash masks |
| Benjamin Herrenschmidt | [PATCH 0/11] ibm_newemac: Candidate patches for 2.6.25 |
