12. March 2012 08:00
A short example to in C to clear an enviroment variable using the libc function unsetenv
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char **argv) {
if (unsetenv("HOME") < 0) {
perror("unsetenv");
exit(EXIT_FAILURE);
}
system("env | grep HOME");
return 0;
}
635e508c-c547-4601-a6c8-98250eaa5d2e|0|.0