summaryrefslogtreecommitdiff
path: root/lib/server/ServerStream.h
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2007-04-28 17:35:01 +0000
committerChris Wilson <chris+github@qwirx.com>2007-04-28 17:35:01 +0000
commitd1642a1b7d5048b3fe182280e84f002f7de65057 (patch)
treee3b18f44ab0deb62ed465290629007a39abee5e7 /lib/server/ServerStream.h
parentf47682f7d047cb6c963ee7eb078979f25740231d (diff)
Don't fork to handle requests when running as a single process (very
useful for debugging). (refs #3)
Diffstat (limited to 'lib/server/ServerStream.h')
-rw-r--r--lib/server/ServerStream.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/server/ServerStream.h b/lib/server/ServerStream.h
index f8578a04..7eb99d13 100644
--- a/lib/server/ServerStream.h
+++ b/lib/server/ServerStream.h
@@ -230,7 +230,7 @@ public:
{
// Since this is a template parameter, the if() will be optimised out by the compiler
#ifndef WIN32 // no fork on Win32
- if(ForkToHandleRequests)
+ if(ForkToHandleRequests && !IsSingleProcess())
{
pid_t pid = ::fork();
switch(pid)
@@ -285,7 +285,7 @@ public:
#ifndef WIN32
// Clean up child processes (if forking daemon)
- if(ForkToHandleRequests)
+ if(ForkToHandleRequests && !IsSingleProcess())
{
int status = 0;
int p = 0;
@@ -326,7 +326,7 @@ protected:
#ifdef WIN32
return false;
#else
- return ForkToHandleRequests;
+ return ForkToHandleRequests && !IsSingleProcess();
#endif // WIN32
}