]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
This change should allow Apache to build on all platforms with the popenf
authorRyan Bloom <rbb@apache.org>
Sat, 11 Sep 1999 15:58:37 +0000 (15:58 +0000)
committerRyan Bloom <rbb@apache.org>
Sat, 11 Sep 1999 15:58:37 +0000 (15:58 +0000)
changes.  I have not been able to test this, but it should be evident what I
am doing if it doesn't work.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83891 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/mpmt_pthread/scoreboard.c

index 34f0f8fba244f275041161df7a3e1e191ada6e6d..3992439f48a60e7c02b575be721915cda45d3b97 100644 (file)
@@ -405,6 +405,8 @@ API_EXPORT(void) reopen_scoreboard(ap_context_t *p)
 #define SCOREBOARD_FILE
 static scoreboard _scoreboard_image;
 static int scoreboard_fd = -1;
+static ap_file_t *scoreboard_file = NULL;
+static ap_file_t *scoreboard_file = NULL;
 
 /* XXX: things are seriously screwed if we ever have to do a partial
  * read or write ... we could get a corrupted scoreboard
@@ -447,9 +449,12 @@ static void cleanup_scoreboard_file(void *foo)
 API_EXPORT(void) reopen_scoreboard(ap_context_t *p)
 {
     if (scoreboard_fd != -1)
-       ap_pclosef(p, scoreboard_fd);
+       ap_close(scoreboard_fd);
 
-    scoreboard_fd = ap_popenf(p, ap_scoreboard_fname, O_CREAT | O_BINARY | O_RDWR, 0666);
+    ap_open(p, ap_scoreboard_fname, APR_CREATE | APR_BINARY | APR_READ | APR_WRITE,
+            APR_UREAD | APR_UWRITE | APR_GREAD | APR_GWRITE | APR_WREAD | APR_WWRITE,
+            &scoreboard_file);
+    ap_get_os_file(scoreboard_file, &scoreboard_fd);
     if (scoreboard_fd == -1) {
        perror(ap_scoreboard_fname);
        fprintf(stderr, "Cannot open scoreboard file:\n");
@@ -475,7 +480,9 @@ void reinit_scoreboard(ap_context_t *p)
     ap_scoreboard_image = &_scoreboard_image;
     ap_scoreboard_fname = ap_server_root_relative(p, ap_scoreboard_fname);
 
-    scoreboard_fd = ap_popenf(p, ap_scoreboard_fname, O_CREAT | O_BINARY | O_RDWR, 0644);
+    ap_open(p, ap_scoreboard_fname, APR_CREATE | APR_BINARY | APR_READ | APR_WRITE,
+            APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD, &scoreboard_file);
+    ap_get_os_file(scoreboard_file, &scoreboard_fd);
     if (scoreboard_fd == -1) {
        perror(ap_scoreboard_fname);
        fprintf(stderr, "Cannot open scoreboard file:\n");