You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Tiago Semprebom <ti...@yahoo.com.br> on 2006/06/28 15:26:22 UTC

Doubt - Help Please

Hello,

I'm changing the mpm prefork. I'm trying to use the cache_pqueue 
functions for create a priority queue. But after that I create a pqueue and I 
trying to insert a intem in my queue, an apache error in run time 
return to me: child pid 9827 exit signal Segmentation fault (11)

I'm using the follow commands in my code (prefork.c):

    cache_pqueue_t*                    handle_p;    (the p. queue)
    apr_ssize_t                             n_p=1000;   
    cache_pqueue_get_priority    pri_p;       
    cache_pqueue_getpos            get_p;   
    cache_pqueue_setpos            set_p;       
    apr_status_t                           status_p;   
    apr_ssize_t                            size_p;
    int                                          teste_p;   

handle_p = cache_pq_init (n_p, pri_p, get_p, set_p);   (start the queue)

teste_p = cache_pq_is_valid (handle_p); (test the queue, return: 1)

size_p = cache_pq_size (handle_p); (queue size, return: 0, of course)

current_conn = ap_run_create_connection(ptrans, ap_server_conf,
                                            csd, my_child_num, sbh, bucket_alloc);

 status_p = cache_pq_insert (handle_p, current_conn);  (after
create a connextion I try to insert a current_conn in my priority queue
(handle_p), but in this point, I have a error (child pid 9827 exit 
signal
Segmentation fault (11)) - I tried to inser a simple int in my queue,
only for test, but apache return the same error.
     
So, one question: Is possible to do what I want ? Can I use the
cache_pqueue functions for it or this functions are only for cache 
stuffs?

Thank's,

regards
Tiago
 		
---------------------------------
 Yahoo! Search
 Música para ver e ouvir: You're Beautiful, do James Blunt