summaryrefslogtreecommitdiff
path: root/threadproc/netware
diff options
context:
space:
mode:
authoraaron <aaron@13f79535-47bb-0310-9956-ffa450edef68>2002-02-21 18:45:07 +0000
committeraaron <aaron@13f79535-47bb-0310-9956-ffa450edef68>2002-02-21 18:45:07 +0000
commit8ea242548bf0bcf9fe847dbe0fa3240e2e9e081d (patch)
tree9d62a3c030f4ed39631c4e85930e1de08d07c6ed /threadproc/netware
parent7fdd8169f302addfc2f72d4aa1e29f84a37bf21a (diff)
downloadlibapr-8ea242548bf0bcf9fe847dbe0fa3240e2e9e081d.tar.gz
Change apr_proc_detach to take a parameter that can enable/disable automatic
forking (aka, to "daemonize"). Detailed explanation: If we are only interested in detaching from the controlling terminal, then we are only interested in creating a new process group (or creating a new session, which implicitly creates a new process group). In order to do so, we must _NOT_ already be a process group leader. The only way to ensure that is true, we normally will call fork() and allow the parent to exit, ensuring that the child is at least a child of a process group leader (and not one itself). Doing this by default prevents some process-watching tools from working with Apache. Therefore, when calling apr_proc_detach with APR_PROC_DETACH_FOREGROUND, the caller is taking responsibility for _NOT_ being a process group leader, which is guaranteed by such process management tools. [A similiar patch was originally submitted Jos and later modifed by Aaron.] Obtained from: Jos Backus <josb@cncdsl.com> Submitted by: Aaron Bannert git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63044 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc/netware')
-rw-r--r--threadproc/netware/procsup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/threadproc/netware/procsup.c b/threadproc/netware/procsup.c
index e7a3d69a4..daa1b8dc7 100644
--- a/threadproc/netware/procsup.c
+++ b/threadproc/netware/procsup.c
@@ -54,7 +54,7 @@
#include "threadproc.h"
-apr_status_t apr_proc_detach(void)
+apr_status_t apr_proc_detach(int daemonize)
{
#if 0
int x;