git://git.iain.cx/iain
/
nssm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed service context detection when built with VS2013.
[nssm.git]
/
nssm.cpp
diff --git
a/nssm.cpp
b/nssm.cpp
index
6456c97
..
35001d3
100644
(file)
--- a/
nssm.cpp
+++ b/
nssm.cpp
@@
-136,7
+136,7
@@
int _tmain(int argc, TCHAR **argv) {
actually running as a service.
\r
This will save time when running with no arguments from a command prompt.
\r
*/
\r
actually running as a service.
\r
This will save time when running with no arguments from a command prompt.
\r
*/
\r
- if (
_fileno(stdin) < 0
) {
\r
+ if (
! GetStdHandle(STD_INPUT_HANDLE)
) {
\r
/* Set up function pointers. */
\r
if (get_imports()) exit(111);
\r
\r
/* Set up function pointers. */
\r
if (get_imports()) exit(111);
\r
\r