]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/inspircd.cpp
Check for windows drive letters on the start of paths and treat them the same as...
[user/henk/code/inspircd.git] / src / inspircd.cpp
index d152e5d1a24b934cd4c44fc464329fc95bda416d..50e76b2a2427ee9dd3e24e2b58c1bd23580bd72d 100644 (file)
@@ -351,7 +351,8 @@ bool InspIRCd::DaemonSeed()
 void InspIRCd::WritePID(const std::string &filename)
 {
        std::string fname = (filename.empty() ? "inspircd.pid" : filename);
-       if (*(fname.begin()) != '/')
+       std::replace(fname.begin(), fname.end(), '\\', '/');
+       if ((fname[0] != '/') && (!Config->StartsWithWindowsDriveLetter(filename)))
        {
                std::string::size_type pos;
                std::string confpath = this->ConfigFileName;
@@ -705,7 +706,7 @@ InspIRCd::InspIRCd(int argc, char** argv)
                 * e.g. we are restarting, or being launched by cron. Dont kill parent, and dont
                 * close stdin/stdout
                 */
-               if (!do_nofork)
+               if ((!do_nofork) && (!do_testsuite))
                {
                        fclose(stdin);
                        fclose(stderr);