httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@hyperreal.org
Subject cvs commit: apache-2.0/src/modules/mpm/mpmt_pthread acceptlock.c scoreboard.c
Date Sat, 11 Sep 1999 15:58:44 GMT
rbb         99/09/11 08:58:44

  Modified:    src/modules/mpm/dexter acceptlock.c
               src/modules/mpm/mpmt_pthread acceptlock.c scoreboard.c
  Log:
  This change should allow Apache to build on all platforms with the popenf
  changes.  I have not been able to test this, but it should be evident what I
  am doing if it doesn't work.
  
  Revision  Changes    Path
  1.7       +6 -3      apache-2.0/src/modules/mpm/dexter/acceptlock.c
  
  Index: acceptlock.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/dexter/acceptlock.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- acceptlock.c	1999/09/08 18:58:46	1.6
  +++ acceptlock.c	1999/09/11 15:58:35	1.7
  @@ -574,12 +574,14 @@
    */ 
   void accept_mutex_child_init(ap_context_t *p)
   {
  +    ap_file_t *tempfile = NULL;
       int i;
     
       for (i = 0; i < lock_count; i++) {
           char *lock_fname = expand_lock_fname(p, i);
       
  -        lock_fd[i] = ap_popenf(p, lock_fname, O_WRONLY, 0600);
  +        ap_open(p, lock_fname, APR_WRITE, APR_UREAD | APR_UWRITE, &tempfile);
  +        ap_get_os_file(tempfile, *lock_fd[i]);
           if (lock_fd[i] == -1) {
   	  ap_log_error(APLOG_MARK, APLOG_EMERG, 
   		       (const server_rec *)ap_get_server_conf(),
  @@ -595,6 +597,7 @@
    */
   void accept_mutex_init(ap_context_t *p, int number_of_locks)
   {
  +    ap_file_t *tempfile = NULL;
       int i;
       char *lock_fname;
     
  @@ -604,8 +607,8 @@
       for (i = 0; i < lock_count; i++) {
           lock_fname = expand_lock_fname(p, i);
           unlink(lock_fname);
  -        lock_fd[i] = ap_popenf(p, lock_fname, 
  -			       O_CREAT | O_WRONLY | O_EXCL, 0600);
  +        ap_open(p, lock_fname, APR_CREATE | APR_WRITE | APR_EXCL, APR_UREAD | APR_UWRITE,
&tempfile);
  +        ap_get_os_file(tempfile, *lock_fd[i]);
           if (lock_fd[i] == -1) {
   	    ap_log_error(APLOG_MARK, APLOG_EMERG, 
   			 (const server_rec *) ap_get_server_conf(), 
  
  
  
  1.9       +7 -3      apache-2.0/src/modules/mpm/mpmt_pthread/acceptlock.c
  
  Index: acceptlock.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_pthread/acceptlock.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- acceptlock.c	1999/09/08 14:15:47	1.8
  +++ acceptlock.c	1999/09/11 15:58:36	1.9
  @@ -572,12 +572,14 @@
    */ 
   void accept_mutex_child_init(ap_context_t *p)
   {
  +    ap_file_t *tempfile = NULL;
       int i;
     
       for (i = 0; i < lock_count; i++) {
           char *lock_fname = expand_lock_fname(p, i);
       
  -        lock_fd[i] = ap_popenf(p, lock_fname, O_WRONLY, 0600);
  +        ap_open(p, lock_fname, APR_WRITE, APR_UREAD | APR_UWRITE, &tempfile);
  +        ap_get_os_file(tempfile, &lock_fd[i]);
           if (lock_fd[i] == -1) {
   	  ap_log_error(APLOG_MARK, APLOG_EMERG, 
   		       (const server_rec *)ap_get_server_conf(),
  @@ -593,6 +595,7 @@
    */
   void accept_mutex_init(ap_context_t *p, int number_of_locks)
   {
  +    ap_file_t *tempfile = NULL;
       int i;
       char *lock_fname;
     
  @@ -602,8 +605,9 @@
       for (i = 0; i < lock_count; i++) {
           lock_fname = expand_lock_fname(p, i);
           unlink(lock_fname);
  -        lock_fd[i] = ap_popenf(p, lock_fname, 
  -			       O_CREAT | O_WRONLY | O_EXCL, 0600);
  +        ap_open(p, lock_fname, APR_CREATE | APR_WRITE | APR_EXCL,
  +                APR_UREAD | APR_UWRITE, &tempfile);
  +        ap_get_os_file(tempfile, &lock_fd[i]);
           if (lock_fd[i] == -1) {
   	    ap_log_error(APLOG_MARK, APLOG_EMERG, 
   			 (const server_rec *) ap_get_server_conf(), 
  
  
  
  1.5       +10 -3     apache-2.0/src/modules/mpm/mpmt_pthread/scoreboard.c
  
  Index: scoreboard.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_pthread/scoreboard.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- scoreboard.c	1999/08/31 05:33:23	1.4
  +++ scoreboard.c	1999/09/11 15:58:37	1.5
  @@ -405,6 +405,8 @@
   #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 @@
   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 @@
       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");
  
  
  

Mime
View raw message