diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/common/BoxConfig-MSVC.h | 2 | ||||
-rw-r--r-- | lib/server/Daemon.cpp | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/common/BoxConfig-MSVC.h b/lib/common/BoxConfig-MSVC.h index e8f90e60..eeb25d2e 100644 --- a/lib/common/BoxConfig-MSVC.h +++ b/lib/common/BoxConfig-MSVC.h @@ -185,7 +185,7 @@ /* Define to 1 if you have the `setproctitle' function. */ /* #undef HAVE_SETPROCTITLE */ - +#define HAVE_SETPROCTITLE 1 /* Define to 1 if you have the `setxattr' function. */ /* #undef HAVE_SETXATTR */ diff --git a/lib/server/Daemon.cpp b/lib/server/Daemon.cpp index b1ada61d..7419f973 100644 --- a/lib/server/Daemon.cpp +++ b/lib/server/Daemon.cpp @@ -1025,9 +1025,14 @@ void Daemon::SetProcessTitle(const char *format, ...) char title[256]; ::vsnprintf(title, sizeof(title), format, args); +#ifdef WIN32 + StringCchCatA(title, sizeof(title)," - " PACKAGE_NAME); + SetConsoleTitleA(title); +#else // !WIN32 // Set process title ::setproctitle("%s", title); - +#endif + #endif // HAVE_SETPROCTITLE } |