You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@hyperreal.org on 1999/10/11 19:57:16 UTC
cvs commit: apache-2.0/src/lib/apr/locks/unix locks.c
rbb 99/10/11 10:57:13
Modified: src/lib/apr/locks/unix locks.c
Log:
This avoids a seg fault when using locks on some unixes. The problem is,
if we pass in a NULL for the filename when creating a lock, we will seg
fault. This is not a permanent solution, but at least the server works with
this change.
Revision Changes Path
1.9 +7 -1 apache-2.0/src/lib/apr/locks/unix/locks.c
Index: locks.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/unix/locks.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- locks.c 1999/10/11 17:51:51 1.8
+++ locks.c 1999/10/11 17:57:07 1.9
@@ -87,7 +87,13 @@
new->cntxt = cont;
new->type = type;
- new->fname = strdup(fname);
+ if (fname != NULL) {
+ new->fname = strdup(fname);
+ }
+ else {
+ new->fname = strdup(tempnam(NULL, NULL));
+ unlink(new->fname);
+ }
if (type != APR_CROSS_PROCESS) {
if ((stat = create_intra_lock(new)) != APR_SUCCESS) {