1 #define _GNU_SOURCE 2 #include <stdlib.h> 3 #include <unistd.h> 4 dummy(char * old,char * new)5static void dummy(char *old, char *new) {} 6 weak_alias(dummy, __env_rm_add); 7 clearenv()8int clearenv() 9 { 10 char **e = __environ; 11 __environ = 0; 12 if (e) while (*e) __env_rm_add(*e++, 0); 13 return 0; 14 } 15