git://git.iain.cx/iain
/
nssm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
897c7ad
)
Fix lockup on with 64 cores.
author
Iain Patterson
<me@iain.cx>
Tue, 16 May 2017 07:18:29 +0000
(08:18 +0100)
committer
Iain Patterson
<me@iain.cx>
Tue, 16 May 2017 07:28:33 +0000
(08:28 +0100)
Thanks foi.
README.txt
patch
|
blob
|
history
nssm.cpp
patch
|
blob
|
history
diff --git
a/README.txt
b/README.txt
index
eaecac2
..
92fe74f
100644
(file)
--- a/
README.txt
+++ b/
README.txt
@@
-1044,6
+1044,7
@@
Thanks to Meang Akira Tanaka for suggestion and initial implementation of
the statuscode command.
\r
Thanks to Kirill Kovalenko for reporting a crash with NANO server.
\r
Thanks to Connor Reynolds for spotting a potential buffer overflow.
\r
the statuscode command.
\r
Thanks to Kirill Kovalenko for reporting a crash with NANO server.
\r
Thanks to Connor Reynolds for spotting a potential buffer overflow.
\r
+Thanks to foi for spotting a hang with 64 cores.
\r
\r
Licence
\r
-------
\r
\r
Licence
\r
-------
\r
diff --git
a/nssm.cpp
b/nssm.cpp
index
69abbfb
..
9c51c53
100644
(file)
--- a/
nssm.cpp
+++ b/
nssm.cpp
@@
-223,7
+223,7
@@
static int elevate(int argc, TCHAR **argv, unsigned long message) {
int num_cpus() {
\r
DWORD_PTR i, affinity, system_affinity;
\r
if (! GetProcessAffinityMask(GetCurrentProcess(), &affinity, &system_affinity)) return 64;
\r
int num_cpus() {
\r
DWORD_PTR i, affinity, system_affinity;
\r
if (! GetProcessAffinityMask(GetCurrentProcess(), &affinity, &system_affinity)) return 64;
\r
- for (i = 0; system_affinity & (1LL << i); i++);
\r
+ for (i = 0; system_affinity & (1LL << i); i++)
if (i == 64) break
;
\r
return (int) i;
\r
}
\r
\r
return (int) i;
\r
}
\r
\r