I had submitted patch foir QNX6 twice in the past. There was no ACK and
generally it was ignored. The patch was used for about half a year on public
site without any problems.
-- Igor
----- Original Message -----
From: "Davide Berti" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 23, 2002 12:28 PM
Subject: QNX 6.1a mod/peer review
> Hello all
>
> httpd-2.0.36, QNX 6.1 RTOS
>
> I have made a modification to apache to get it to run
> on qnx. It kept hanging. I traced it down and made
> some changes to get it to run. I wanted to proof
> these changes with the apache community and get some
> feedback as to the longterm consequences/ side effects
> of these changes. I am attaching a diff of the
> changes that I made.
>
> I also noticed that SSL doesn't seem to work unless
> the -X flag is passed to httpd, any ideas.
>
> Thanks
> /Davide
>
> --- httpd-2.0.36/srclib/apr/locks/unix/proc_mutex.c
> Mon Apr 8 23:56:56 2002
> +++ ../httpd-2.0.36/srclib/apr/locks/unix/proc_mutex.c
> Wed May 8 16:04:51 2002
> @@ -318,7 +318,9 @@
> if (munmap((caddr_t)mutex->pthread_interproc,
> sizeof(pthread_mutex_t))){
> return errno;
> }
> - }
> + if(shm_unlink("/datapoints")) // DB
> + return errno;
> + }
> return APR_SUCCESS;
> }
>
> @@ -329,11 +331,15 @@
> int fd;
> pthread_mutexattr_t mattr;
>
> - fd = open("/dev/zero", O_RDWR);
> - if (fd < 0) {
> - return errno;
> - }
> + fd=shm_open("/datapoints",O_RDWR|O_CREAT,0777);
> file://DB
> + if (fd < 0)
> + return errno;
>
> + if(ftruncate(fd,sizeof(pthread_mutex_t))==-1) file://DB
> + return errno;
> +
> +
> +
> new_mutex->pthread_interproc = (pthread_mutex_t
> *)mmap(
> (caddr_t) 0,
>
> sizeof(pthread_mutex_t),
> @@ -363,10 +369,11 @@
>
> PTHREAD_MUTEX_ROBUST_NP))) {
> #ifdef PTHREAD_SETS_ERRNO
> rv = errno;
> -#endif
> +#endif // DB
> proc_mutex_proc_pthread_cleanup(new_mutex);
> return rv;
> }
> +#endif
> if ((rv = pthread_mutexattr_setprotocol(&mattr,
> PTHREAD_PRIO_INHERIT))) {
> #ifdef PTHREAD_SETS_ERRNO
> rv = errno;
> @@ -374,9 +381,15 @@
> proc_mutex_proc_pthread_cleanup(new_mutex);
> return rv;
> }
> + if ((rv =
> pthread_mutex_destroy(new_mutex->pthread_interproc)))
> { // DB
> +#ifdef PTHREAD_SETS_ERRNO
> + rv = errno;
> #endif
> + proc_mutex_proc_pthread_cleanup(new_mutex);
> + return rv;
> + }
>
> - if ((rv =
> pthread_mutex_init(new_mutex->pthread_interproc,
> &mattr))) {
> + if ((rv =
> pthread_mutex_init(new_mutex->pthread_interproc,
> &mattr))) {
> #ifdef PTHREAD_SETS_ERRNO
> rv = errno;
> #endif
>
> __________________________________________________
> Do You Yahoo!?
> LAUNCH - Your Yahoo! Music Experience
> http://launch.yahoo.com
>