Diff
Not logged in

Differences From Artifact [2cb57c6a2c]:

To Artifact [fc64ea2676]:


689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
      g.argv = zNewArgv;
    }
    zCmdName = g.argv[1];
  }
#ifndef _WIN32
  /* Make sure open() will not return file descriptor 2. */
  { int nTry = 0;
    while( !is_valid_fd(2) && nTry++ < 2 && open("/dev/null",O_WRONLY)>0 ){}
    if( !is_valid_fd(2) ){
      fossil_fatal("file descriptor 2 is not open");
    }
  }
#endif
  rc = name_search(zCmdName, aCommand, count(aCommand), FOSSIL_FIRST_CMD, &idx);
  if( rc==1 ){







|







689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
      g.argv = zNewArgv;
    }
    zCmdName = g.argv[1];
  }
#ifndef _WIN32
  /* Make sure open() will not return file descriptor 2. */
  { int nTry = 0;
    while( !is_valid_fd(2) && nTry++ < 2 && open("/dev/null",O_WRONLY)>=0 ){}
    if( !is_valid_fd(2) ){
      fossil_fatal("file descriptor 2 is not open");
    }
  }
#endif
  rc = name_search(zCmdName, aCommand, count(aCommand), FOSSIL_FIRST_CMD, &idx);
  if( rc==1 ){