summaryrefslogtreecommitdiff
path: root/src/child.c
diff options
context:
space:
mode:
authorRobert James Kaes <rjkaes@users.sourceforge.net>2002-05-29 20:49:55 +0000
committerRobert James Kaes <rjkaes@users.sourceforge.net>2002-05-29 20:49:55 +0000
commit360deb4568198575abccd952b36360775e231509 (patch)
tree1caa57536f502f9f83c08cd66ad40df174f21f22 /src/child.c
parentde782144bd16222fb55070e51e2941adf058f97e (diff)
downloadtinyproxy-360deb4568198575abccd952b36360775e231509.tar.gz
tinyproxy-360deb4568198575abccd952b36360775e231509.zip
Changed the tests on the return value from malloc_shared_memory() to make tinyproxy more portable, since we can't be certain that "if (!ret_value)" would actually detect a mmap() error.
Diffstat (limited to '')
-rw-r--r--src/child.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/child.c b/src/child.c
index 9ac74e4..9b5bf33 100644
--- a/src/child.c
+++ b/src/child.c
@@ -1,4 +1,4 @@
-/* $Id: child.c,v 1.1 2002-05-26 18:45:26 rjkaes Exp $
+/* $Id: child.c,v 1.2 2002-05-29 20:49:55 rjkaes Exp $
*
* Handles the creation/destruction of the various children required for
* processing incoming connections.
@@ -269,14 +269,14 @@ child_pool_create(void)
}
child_ptr = calloc_shared_memory(child_config.maxclients,
- sizeof(struct child_s));
+ sizeof(struct child_s));
if (!child_ptr) {
log_message(LOG_ERR, "Could not allocate memory for children.");
return -1;
}
servers_waiting = malloc_shared_memory(sizeof(int));
- if (!servers_waiting) {
+ if (servers_waiting == MAP_FAILED) {
log_message(LOG_ERR, "Could not allocate memory for child counting.");
return -1;
}