/ Check-in [0c683c43]
Login

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

Overview
Comment:Omit O_NOFOLLOW from the open() call when opening /dev/null, since /dev/null is a symlink on Solaris, we are told.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 0c683c43a62fe25c6cb765e4a31556ec91a7c21af79349b3d7eeb13f73dd1cdc
User & Date: drh 2020-02-13 13:45:04
Context
2020-02-13
14:51
Disallow the skip-scan optimization in the absence of sqlite_stat1 data. (check-in: e0c6b8bd user: drh tags: trunk)
13:45
Omit O_NOFOLLOW from the open() call when opening /dev/null, since /dev/null is a symlink on Solaris, we are told. (check-in: 0c683c43 user: drh tags: trunk)
11:46
Fix an incorrect assert() statement that was added yesterday. Tickets [41c1456a6e61c0e7] and [fb8c538a8f57ae2a]. (check-in: abfb043e user: drh tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/os_unix.c.

685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
      break;
    }
    if( fd>=SQLITE_MINIMUM_FILE_DESCRIPTOR ) break;
    osClose(fd);
    sqlite3_log(SQLITE_WARNING, 
                "attempt to open \"%s\" as file descriptor %d", z, fd);
    fd = -1;
    if( osOpen("/dev/null", f, m)<0 ) break;
  }
  if( fd>=0 ){
    if( m!=0 ){
      struct stat statbuf;
      if( osFstat(fd, &statbuf)==0 
       && statbuf.st_size==0
       && (statbuf.st_mode&0777)!=m 







|







685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
      break;
    }
    if( fd>=SQLITE_MINIMUM_FILE_DESCRIPTOR ) break;
    osClose(fd);
    sqlite3_log(SQLITE_WARNING, 
                "attempt to open \"%s\" as file descriptor %d", z, fd);
    fd = -1;
    if( osOpen("/dev/null", O_RDONLY, m)<0 ) break;
  }
  if( fd>=0 ){
    if( m!=0 ){
      struct stat statbuf;
      if( osFstat(fd, &statbuf)==0 
       && statbuf.st_size==0
       && (statbuf.st_mode&0777)!=m