clearenv() Sun Solaris [Archive] - C Board

PDA

View Full Version : clearenv() Sun Solaris


IfYouSaySo
09-23-2003, 06:32 PM
This is technically a unix question, but...

It seems that clearenv() is not provided by sun. I'm compiling with gcc. Does anyone know of an alternate way to clear the environment? Thanks.

twm
09-23-2003, 06:59 PM
>Does anyone know of an alternate way to clear the environment?
Walk through all of the strings in the environ vector, cut out the variable name and call unsetenv on it.