You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by bj...@hyperreal.org on 1999/05/25 17:32:57 UTC

cvs commit: apache-1.3/src/main alloc.c

bjh         99/05/25 08:32:55

  Modified:    src/main alloc.c
  Log:
  In OS/2 process spawning, move calls to change pipe handle inheritance
  to the correct places so they only get called for the pipes that have
  actually created.
  
  Revision  Changes    Path
  1.113     +3 -4      apache-1.3/src/main/alloc.c
  
  Index: alloc.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/alloc.c,v
  retrieving revision 1.112
  retrieving revision 1.113
  diff -u -r1.112 -r1.113
  --- alloc.c	1999/05/02 14:01:01	1.112
  +++ alloc.c	1999/05/25 15:32:54	1.113
  @@ -2205,23 +2205,22 @@
               save_out = dup(STDOUT_FILENO);
               dup2(out_fds[1], STDOUT_FILENO);
               close(out_fds[1]);
  +            DosSetFHState(out_fds[0], OPEN_FLAGS_NOINHERIT);
           }
   
           if (pipe_in) {
               save_in = dup(STDIN_FILENO);
               dup2(in_fds[0], STDIN_FILENO);
               close(in_fds[0]);
  +            DosSetFHState(in_fds[1], OPEN_FLAGS_NOINHERIT);
           }
   
           if (pipe_err) {
               save_err = dup(STDERR_FILENO);
               dup2(err_fds[1], STDERR_FILENO);
               close(err_fds[1]);
  +            DosSetFHState(err_fds[0], OPEN_FLAGS_NOINHERIT);
           }
  -    
  -        DosSetFHState(in_fds[1], OPEN_FLAGS_NOINHERIT);
  -        DosSetFHState(out_fds[0], OPEN_FLAGS_NOINHERIT);
  -        DosSetFHState(err_fds[0], OPEN_FLAGS_NOINHERIT);
           
           pid = func(data, NULL);