projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Pageant now detects if it is already running and refuses to start if so
[u/mdw/putty]
/
pageant.c
diff --git
a/pageant.c
b/pageant.c
index
1619749
..
f8d7ad2
100644
(file)
--- a/
pageant.c
+++ b/
pageant.c
@@
-545,6
+545,15
@@
int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) {
WNDCLASS wndclass;
MSG msg;
WNDCLASS wndclass;
MSG msg;
+ /*
+ * First bomb out totally if we are already running.
+ */
+ if (FindWindow("Pageant", "Pageant")) {
+ MessageBox(NULL, "Pageant is already running", "Pageant Error",
+ MB_ICONERROR | MB_OK);
+ return 0;
+ }
+
instance = inst;
if (!prev) {
instance = inst;
if (!prev) {