dgaudet     97/06/23 17:39:20

  Modified:    src       util.c
  Log:
  ap_slack: don't try to dup if the fd is already above the line
  
  Revision  Changes    Path
  1.56      +4 -1      apache/src/util.c
  
  Index: util.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/util.c,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -C3 -r1.55 -r1.56
  *** util.c    1997/06/23 23:56:18     1.55
  --- util.c    1997/06/24 00:39:19     1.56
  ***************
  *** 1344,1350 ****
        int new_fd;
    
    #ifdef HIGH_SLACK_LINE
  !     if (line == AP_SLACK_HIGH) {
        new_fd = fcntl (fd, F_DUPFD, HIGH_SLACK_LINE);
        if (new_fd != -1) {
            close (fd);
  --- 1344,1350 ----
        int new_fd;
    
    #ifdef HIGH_SLACK_LINE
  !     if (line == AP_SLACK_HIGH && fd < HIGH_SLACK_LINE) {
        new_fd = fcntl (fd, F_DUPFD, HIGH_SLACK_LINE);
        if (new_fd != -1) {
            close (fd);
  ***************
  *** 1353,1358 ****
  --- 1353,1361 ----
        }
    #endif
        /* otherwise just assume line == AP_SLACK_LOW */
  +     if (fd >= LOW_SLACK_LINE) {
  +     return fd;
  +     }
        new_fd = fcntl (fd, F_DUPFD, LOW_SLACK_LINE);
        if (new_fd == -1) {
          return fd;
  
  
  

Reply via email to