+ /*This is log stuff */
+ std::string logname = "/home/" + name + "/.mnenc/log";
+ std::ofstream log; //Log stream
+ log.open(logname.c_str(), ios::app); // open log
+ time_t rawtime; //Time stuff here
+ struct tm * timeinfo;
+ time ( &rawtime );
+ timeinfo = localtime ( &rawtime );
+ std::string current_time = asctime (timeinfo); //Holds current time
+
+ /* Create a new SID for the child process */
+ sid = setsid();
+ if (sid < 0) {
+ log << current_time << ": Unable to create a new SID for the child process\n";
+ exit(EXIT_FAILURE);
+ }
+