summaryrefslogtreecommitdiff
path: root/threadproc
diff options
context:
space:
mode:
authorjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2005-11-28 15:54:49 +0000
committerjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2005-11-28 15:54:49 +0000
commitb35874e758efa9b84a72a35752d0dd1aaf77bc78 (patch)
tree6566d90f2a7bf8d69660dfcfb6adce113cb1263d /threadproc
parent6d95c36cf7f3d661ecdafdde2a549c70198a1fb5 (diff)
downloadlibapr-b35874e758efa9b84a72a35752d0dd1aaf77bc78.tar.gz
* threadproc/unix/procsup.c (apr_proc_detach): Check chdir() return
value (fixes gcc warning with modern glibc and -D_FORTIFY_SOURCE=2). git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@349408 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc')
-rw-r--r--threadproc/unix/procsup.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/threadproc/unix/procsup.c b/threadproc/unix/procsup.c
index 5165a8f9e..2595edf0b 100644
--- a/threadproc/unix/procsup.c
+++ b/threadproc/unix/procsup.c
@@ -20,7 +20,10 @@ APR_DECLARE(apr_status_t) apr_proc_detach(int daemonize)
{
int x;
- chdir("/");
+ if (chdir("/") == -1) {
+ return errno;
+ }
+
#if !defined(MPE) && !defined(OS2) && !defined(TPF) && !defined(BEOS)
/* Don't detach for MPE because child processes can't survive the death of
* the parent. */