On the importance of return codes
Posted Dec 3, 2009 9:57 UTC (Thu) by
hppnq (guest, #14462)
In reply to:
On the importance of return codes by jimparis
Parent article:
On the importance of return codes
That's because getenv(), unlike unsetenv(), does not always check for a corrupt environment: it simply loops over the entire environment when the program brings its own. So getenv() skips environ[0] and reads LD_PRELOAD from environ[1], while unsetenv() complains about the corrupted environ[0].
It seems only a relatively recent change to unsetenv() introduced a non-void return value, and that the loader code was not updated at the same time.
(
Log in to post comments)