Fossil

Check-in [a3ade265]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:If file descriptor 2 is not open, try twice to open it. If it still is not open, just continue on, because presumably it won't open on any subquent open() system call.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:a3ade265680a8488627275fb8beafebedd136add
User & Date: drh 2015-02-07 16:59:40
Context
2015-02-07
17:06
Fix the <base> tag in the Download page so that it omits the URL scheme. This permits the download page to work with both HTTP: and with HTTPS:. check-in: 1022c0fc user: drh tags: trunk
16:59
If file descriptor 2 is not open, try twice to open it. If it still is not open, just continue on, because presumably it won't open on any subquent open() system call. check-in: a3ade265 user: drh tags: trunk
15:59
Faster and more accurate method for computing file-age. Also add the showid query parameter to /fileage and extend showid on /timeline to show the RIDs for individual files when the "v" query parameter is used. check-in: dd51f09a user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/main.c.

687
688
689
690
691
692
693
694
695




696
697
698
699
700
701
702
      zNewArgv[1] = "help";
      g.argc++;
      g.argv = zNewArgv;
    }
    zCmdName = g.argv[1];
  }
#ifndef _WIN32
  if( !is_valid_fd(2) ) fossil_panic("file descriptor 2 not open");
  /* if( is_valid_fd(3) ) fossil_warning("file descriptor 3 is open"); */




#endif
  rc = name_search(zCmdName, aCommand, count(aCommand), FOSSIL_FIRST_CMD, &idx);
  if( rc==1 ){
#ifdef FOSSIL_ENABLE_TH1_HOOKS
    if( !g.isHTTP && !g.fNoThHook ){
      rc = Th_CommandHook(zCmdName, 0);
    }else{







|
|
>
>
>
>







687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
      zNewArgv[1] = "help";
      g.argc++;
      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);
    }
  }
#endif
  rc = name_search(zCmdName, aCommand, count(aCommand), FOSSIL_FIRST_CMD, &idx);
  if( rc==1 ){
#ifdef FOSSIL_ENABLE_TH1_HOOKS
    if( !g.isHTTP && !g.fNoThHook ){
      rc = Th_CommandHook(zCmdName, 0);
    }else{