actually, I still don't like the user of getenv("HOME"); over
struct passwd pwd; errno = 0; pwd = getpwuid(getuid()); if (pwd) cdir = pwd->pw_dir; else { //error handling }
actually, I still don't like the user of getenv("HOME"); over
pwd = getpwuid(getuid());
if (pwd)
else {
}