openbsd-ports/x11/slim/patches/patch-app_h
landry e9ec1693c7 Fix a nasty race condition/crash reported by 'goebbels@wp.pl' : when an
X session finishes, slim goes to restart X, but if the machine is being
halted, slim gets a SIGTERM, and the signal handler tries to kill the X
server without checking if is has been restarted yet. Boom.
While here, fix xauth path.
2009-11-05 19:05:12 +00:00

38 lines
828 B
Plaintext

$OpenBSD: patch-app_h,v 1.2 2009/11/05 19:05:12 landry Exp $
--- app.h.orig Fri Sep 26 02:54:15 2008
+++ app.h Wed Oct 28 19:30:39 2009
@@ -28,6 +28,16 @@
#include "PAM.h"
#endif
+#include <string>
+
+namespace Util {
+ bool add_mcookie(const std::string &mcookie, const char *display,
+ const std::string &xauth_cmd, const std::string &authfile);
+ void srandom(unsigned long seed);
+ long random(void);
+ long makeseed(void);
+};
+
class App {
public:
App(int argc, char** argv);
@@ -36,6 +46,7 @@ class App { (public)
int GetServerPID();
void StopServer();
+ bool serverStarted;
// Lock functions
void GetLock();
void RemoveLock();
@@ -101,6 +112,8 @@ class App { (public)
std::string themeName;
std::string mcookie;
+
+ const int mcookiesize;
};