1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-26 19:01:35 +03:00

Get it to build on FreeBSD by dropping <stropt.h>. (It still

builds on Linux.)

Pass an initialized thread attribute instead of an accidental
autodata value to apr_create_signal_thread().  This should
avoid a segfault.  It seemed to behave a little better for me
at this point.

Get rid of some warnings.

gcc on FreeBSD still warns about a few variables that might be
clobbered by longjmp() in worker_thread().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88283 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jeff Trawick
2001-02-23 03:19:29 +00:00
parent 192cc6b8a5
commit fd8b671cc0
2 changed files with 6 additions and 12 deletions

View File

@@ -103,7 +103,6 @@
#include <sys/stat.h>
#include <sys/un.h>
#include <setjmp.h>
#include <stropts.h>
/*
* Actual definitions of config globals
@@ -698,7 +697,7 @@ static void *worker_thread(void *arg)
cmsg = apr_palloc(ptrans, sizeof(*cmsg) + sizeof(sd));
cmsg->cmsg_len = sizeof(*cmsg) + sizeof(sd);
msg.msg_control = cmsg;
msg.msg_control = (caddr_t)cmsg;
msg.msg_controllen = cmsg->cmsg_len;
msg.msg_flags = 0;
@@ -842,7 +841,6 @@ static void child_main(int child_num_arg)
ap_listen_rec *lr;
apr_status_t rv;
apr_thread_t *thread;
apr_threadattr_t *thread_attr;
my_pid = getpid();
child_num = child_num_arg;
@@ -909,8 +907,7 @@ static void child_main(int child_num_arg)
apr_threadattr_create(&worker_thread_attr, pchild);
apr_threadattr_detach_set(worker_thread_attr);
apr_create_signal_thread(&thread, thread_attr, check_signal, pchild);
apr_create_signal_thread(&thread, worker_thread_attr, check_signal, pchild);
/* We are creating worker threads right now */
for (i=0; i < threads_to_start; i++) {
@@ -1373,7 +1370,7 @@ static int pass_request(request_rec *r)
memcpy(CMSG_DATA(cmsg), &sfd, sizeof(sfd));
msg.msg_control = cmsg;
msg.msg_control = (caddr_t)cmsg;
msg.msg_controllen = cmsg->cmsg_len;
msg.msg_flags=0;

View File

@@ -103,7 +103,6 @@
#include <sys/stat.h>
#include <sys/un.h>
#include <setjmp.h>
#include <stropts.h>
/*
* Actual definitions of config globals
@@ -698,7 +697,7 @@ static void *worker_thread(void *arg)
cmsg = apr_palloc(ptrans, sizeof(*cmsg) + sizeof(sd));
cmsg->cmsg_len = sizeof(*cmsg) + sizeof(sd);
msg.msg_control = cmsg;
msg.msg_control = (caddr_t)cmsg;
msg.msg_controllen = cmsg->cmsg_len;
msg.msg_flags = 0;
@@ -842,7 +841,6 @@ static void child_main(int child_num_arg)
ap_listen_rec *lr;
apr_status_t rv;
apr_thread_t *thread;
apr_threadattr_t *thread_attr;
my_pid = getpid();
child_num = child_num_arg;
@@ -909,8 +907,7 @@ static void child_main(int child_num_arg)
apr_threadattr_create(&worker_thread_attr, pchild);
apr_threadattr_detach_set(worker_thread_attr);
apr_create_signal_thread(&thread, thread_attr, check_signal, pchild);
apr_create_signal_thread(&thread, worker_thread_attr, check_signal, pchild);
/* We are creating worker threads right now */
for (i=0; i < threads_to_start; i++) {
@@ -1373,7 +1370,7 @@ static int pass_request(request_rec *r)
memcpy(CMSG_DATA(cmsg), &sfd, sizeof(sfd));
msg.msg_control = cmsg;
msg.msg_control = (caddr_t)cmsg;
msg.msg_controllen = cmsg->cmsg_len;
msg.msg_flags=0;