summaryrefslogtreecommitdiff
path: root/threadproc
diff options
context:
space:
mode:
authortrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2002-04-08 13:08:18 +0000
committertrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2002-04-08 13:08:18 +0000
commit6d0229a0e69e888c2c91f209e68e247d4a711871 (patch)
tree45d8ea7ac0de0f8414a1d7106b3b3ef2288ec172 /threadproc
parent11980311454f116a050e690eb694c48b88a3f6a4 (diff)
downloadlibapr-6d0229a0e69e888c2c91f209e68e247d4a711871.tar.gz
apr_proc_detach():
stop working so hard to figure out the process group id; we don't use that information (logic was inherited from Apache 1.3, which does use the information) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63229 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc')
-rw-r--r--threadproc/unix/procsup.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/threadproc/unix/procsup.c b/threadproc/unix/procsup.c
index 649f670d5..50aa5075b 100644
--- a/threadproc/unix/procsup.c
+++ b/threadproc/unix/procsup.c
@@ -57,7 +57,6 @@
APR_DECLARE(apr_status_t) apr_proc_detach(int daemonize)
{
int x;
- pid_t pgrp;
chdir("/");
#if !defined(MPE) && !defined(OS2) && !defined(TPF) && !defined(BEOS)
@@ -77,21 +76,17 @@ APR_DECLARE(apr_status_t) apr_proc_detach(int daemonize)
#endif
#ifdef HAVE_SETSID
- if ((pgrp = setsid()) == -1) {
+ if (setsid() == -1) {
return errno;
}
#elif defined(NEXT) || defined(NEWSOS)
- if (setpgrp(0, getpid()) == -1 || (pgrp = getpgrp(0)) == -1) {
+ if (setpgrp(0, getpid()) == -1) {
return errno;
}
-#elif defined(OS2) || defined(TPF)
- /* OS/2 don't support process group IDs */
- pgrp = getpid();
-#elif defined(MPE)
- /* MPE uses negative pid for process group */
- pgrp = -getpid();
+#elif defined(OS2) || defined(TPF) || defined(MPE)
+ /* do nothing */
#else
- if ((pgrp = setpgid(0, 0)) == -1) {
+ if (setpgid(0, 0) == -1) {
return errno;
}
#endif