[Box Backup-commit] COMMIT r3180 - in box/trunk/lib: common server
subversion at boxbackup.org
subversion at boxbackup.org
Sun Aug 25 10:51:08 BST 2013
Author: chris
Date: 2013-08-25 10:51:07 +0100 (Sun, 25 Aug 2013)
New Revision: 3180
Modified:
box/trunk/lib/common/BoxConfig-MSVC.h
box/trunk/lib/server/Daemon.cpp
Log:
Set process title on Windows.
Thanks to Arnaud for submitting the patch:
"I propose a little patch to enable the SetProcessTitle function on windows system."
Modified: box/trunk/lib/common/BoxConfig-MSVC.h
===================================================================
--- box/trunk/lib/common/BoxConfig-MSVC.h 2013-08-22 00:48:41 UTC (rev 3179)
+++ box/trunk/lib/common/BoxConfig-MSVC.h 2013-08-25 09:51:07 UTC (rev 3180)
@@ -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 */
Modified: box/trunk/lib/server/Daemon.cpp
===================================================================
--- box/trunk/lib/server/Daemon.cpp 2013-08-22 00:48:41 UTC (rev 3179)
+++ box/trunk/lib/server/Daemon.cpp 2013-08-25 09:51:07 UTC (rev 3180)
@@ -1025,9 +1025,14 @@
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
}
More information about the Boxbackup-commit
mailing list