You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2001/06/26 19:15:56 UTC
cvs commit: apr/locks/unix crossproc.c
trawick 01/06/26 10:15:56
Modified: locks/unix crossproc.c
Log:
get flock() mechanism child init working for APR_LOCK_ALL+APR_HAS_THREADS;
previously, we didn't copy the pthread mutex or the intra process
lock methods, leading to segfaults in a child process using the
flock() mechanism
Revision Changes Path
1.48 +2 -6 apr/locks/unix/crossproc.c
Index: crossproc.c
===================================================================
RCS file: /home/cvs/apr/locks/unix/crossproc.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- crossproc.c 2001/06/25 20:23:14 1.47
+++ crossproc.c 2001/06/26 17:15:51 1.48
@@ -486,14 +486,10 @@
{
apr_lock_t *new;
- new = (apr_lock_t *)apr_pcalloc(cont, sizeof(apr_lock_t));
+ new = (apr_lock_t *)apr_palloc(cont, sizeof(apr_lock_t));
+ memcpy(new, *lock, sizeof *new);
new->pool = cont;
- new->meth = (*lock)->meth;
- new->inter_meth = (*lock)->inter_meth;
- new->intra_meth = NULL;
- new->type = (*lock)->type;
- new->scope = (*lock)->scope;
new->fname = apr_pstrdup(cont, fname);
new->interproc = open(new->fname, O_WRONLY, 0600);
if (new->interproc == -1) {