]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix socket_magic_cleanup() to not dump core when invoked
authorMartin Kraemer <martin@apache.org>
Wed, 11 Dec 2002 12:23:52 +0000 (12:23 +0000)
committerMartin Kraemer <martin@apache.org>
Wed, 11 Dec 2002 12:23:52 +0000 (12:23 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@97842 13f79535-47bb-0310-9956-ffa450edef68

src/main/alloc.c

index e2c9bc4f4205ab2a0b1c6aff515c7b990632433e..87e63fc75988de921ab8139033d61bd8576e9e85 100644 (file)
@@ -2027,7 +2027,7 @@ static void socket_cleanup(void *fdv)
 }
 static int socket_magic_cleanup(void *fpv)
 {
-    return ap_close_fd_on_exec(fileno((FILE *) fpv));
+    return ap_close_fd_on_exec((int) (long) fpv));
 }
 
 API_EXPORT(void) ap_note_cleanups_for_socket_ex(pool *p, int fd, int domagic)