Here is the patch which uses extended_FILE function
(I'm unable to post the webrev as my build m/c is down).
With this, duphi.patch is no longer needed.
--- apr-1.3.3/misc/unix/start.c.orig Mon Sep 22 04:16:53 2008
+++ apr-1.3.3/misc/unix/start.c Mon Sep 22 04:14:52 2008
@@ -23,6 +23,10 @@
#include "apr_arch_proc_mutex.h" /* for apr_proc_mutex_unix_setup_lock() */
#include "apr_arch_internal_time.h"
+#if defined(SOLARIS2) && !defined(_LP64)
+#include <stdio_ext.h>
+#endif
+
APR_DECLARE(apr_status_t) apr_app_initialize(int *argc,
const char * const * *argv,
const char * const * *env)
@@ -46,6 +50,12 @@
return APR_SUCCESS;
}
+#if defined(SOLARIS2) && !defined(_LP64)
+ if (enable_extended_FILE_stdio (-1, -1) < 0) {
+ return APR_FROM_OS_ERROR(errno);
+ }
+#endif
+
#if !defined(BEOS) && !defined(OS2)
apr_proc_mutex_unix_setup_lock();
apr_unix_setup_time();
-- Seema.
On 09/18/08 18:13, Seema Alevoor wrote:
>
> On 09/18/08 02:10, Jeff Trawick wrote:
>> (one day I'll learn to open a defect)
>>
>> duphi.patch.patch
>>
>> The socket descriptor shouldn't be moved in 64-bit mode (patch should
>> check build environment) since the 256-fd limit for stdio is not an
>> issue for 64-bit apps.
>>
> Will fix it.
>
>> Low descriptors will be chewed up by other apr functions (file open,
>> pipe open, accept) as well as non-apr code. I guess it helps some apps
>> in some configurations (e.g., httpd has a big bunch of listening sockets
>> and some plugin module or support library uses fopen(). If this patch is
>> important for 32-bit apps, it would seem even more important to do the
>> same thing for file descriptors created by apr_file_open().
>
> Agreed. This patch was added to fix CR 6367565 (
> Bundled apache runs out of file descriptors when there are many SSL enabled
> virtual hosts)
> In this case, ssl library used fopen to create a temporary file.
>
>> Fishing for other thoughts:
>>
>> Maybe some of the other solutions at
>> http://developers.sun.com/solaris/articles/stdio_256.html are more
>> appropriate to the 32-bit case.
>
> Thanks for the link. enable_extended_FILE_stdio seems to be the better choice.
>
>
> Regards,
> Seema.
>
>
> _______________________________________________
>
>
> webstack-discuss mailing list
> webstack-discuss at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/webstack-discuss