You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@locus.apache.org on 2000/06/03 05:24:39 UTC
cvs commit: apache-2.0/src/lib/apr/locks/unix crossproc.c locks.c
trawick 00/06/02 20:24:39
Modified: src/lib/apr/locks/unix crossproc.c locks.c
Log:
fix problems in recent change to use mkstemp(); also, fix
not-so-recent bug in flock support (destroy_inter_lock was
renamed to ap_unix_destroy_inter_lock)
Revision Changes Path
1.28 +15 -3 apache-2.0/src/lib/apr/locks/unix/crossproc.c
Index: crossproc.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/unix/crossproc.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- crossproc.c 2000/04/14 15:58:30 1.27
+++ crossproc.c 2000/06/03 03:24:38 1.28
@@ -269,7 +269,13 @@
ap_status_t ap_unix_create_inter_lock(ap_lock_t *new)
{
- new->interproc = open(new->fname, O_CREAT | O_WRONLY | O_EXCL, 0644);
+ if (new->fname) {
+ new->interproc = open(new->fname, O_CREAT | O_WRONLY | O_EXCL, 0644);
+ }
+ else {
+ new->fname = ap_pstrdup(new->cntxt, "/tmp/aprXXXXXX");
+ new->interproc = mkstemp(new->fname);
+ }
if (new->interproc < 0) {
lock_cleanup(new);
@@ -338,7 +344,13 @@
ap_status_t ap_unix_create_inter_lock(ap_lock_t *new)
{
- new->interproc = open(new->fname, O_CREAT | O_WRONLY | O_EXCL, 0600);
+ if (new->fname) {
+ new->interproc = open(new->fname, O_CREAT | O_WRONLY | O_EXCL, 0644);
+ }
+ else {
+ new->fname = ap_pstrdup(new->cntxt, "/tmp/aprXXXXXX");
+ new->interproc = mkstemp(new->fname);
+ }
if (new->interproc < 0) {
lock_cleanup(new);
@@ -387,7 +399,7 @@
new->fname = ap_pstrdup(cont, fname);
new->interproc = open(new->fname, O_CREAT | O_WRONLY | O_EXCL, 0600);
if (new->interproc == -1) {
- destroy_inter_lock(new);
+ ap_unix_destroy_inter_lock(new);
return errno;
}
return APR_SUCCESS;
1.33 +0 -6 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.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- locks.c 2000/06/03 00:31:13 1.32
+++ locks.c 2000/06/03 03:24:38 1.33
@@ -73,12 +73,6 @@
if (fname != NULL) {
new->fname = ap_pstrdup(cont, fname);
}
- else {
- char *filename = "/tmp/aprXXXXXX";
- new->interproc = mkstemp(filename);
- new->fname = ap_pstrdup(cont, filename);
- unlink(new->fname);
- }
}
#endif
Re: cvs commit: apache-2.0/src/lib/apr/locks/unix crossproc.c locks.c
Posted by rb...@covalent.net.
> Modified: src/lib/apr/locks/unix crossproc.c locks.c
> Log:
> fix problems in recent change to use mkstemp(); also, fix
> not-so-recent bug in flock support (destroy_inter_lock was
> renamed to ap_unix_destroy_inter_lock)
Jeff and Greg, thanks for fixing these bugs. I left for home not long
after the commit, so I missed the discussion. The proper fix for this was
probably to just release the alpha now that I think about it. We have had
that bug for a while, and one more alpha with it wouldn't have hurt. :-(
Ryan
_______________________________________________________________________________
Ryan Bloom rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------
Re: cvs commit: apache-2.0/src/lib/apr/locks/unix crossproc.c locks.c
Posted by rb...@covalent.net.
> Modified: src/lib/apr/locks/unix crossproc.c locks.c
> Log:
> fix problems in recent change to use mkstemp(); also, fix
> not-so-recent bug in flock support (destroy_inter_lock was
> renamed to ap_unix_destroy_inter_lock)
Jeff and Greg, thanks for fixing these bugs. I left for home not long
after the commit, so I missed the discussion. The proper fix for this was
probably to just release the alpha now that I think about it. We have had
that bug for a while, and one more alpha with it wouldn't have hurt. :-(
Ryan
_______________________________________________________________________________
Ryan Bloom rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------