Changeset 26381 in vbox
- Timestamp:
- Feb 9, 2010 2:47:15 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 57474
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/solaris/SUPLib-solaris.cpp
r26362 r26381 82 82 return VINF_SUCCESS; 83 83 84 #ifdef VBOXFLT_DUMMYFILES85 84 /* 86 85 * Open dummy files to preallocate file descriptors, see #4650. 87 86 */ 88 for (int i = 0; i < VBOXFLT_DUMMYFILES; i++) 89 { 87 for (int i = 0; i < SUPLIB_FLT_DUMMYFILES; i++) 88 { 89 pThis->hDummy[i] = -1; 90 90 int hDummy = open("/dev/null", O_RDWR, 0); 91 fcntl(hDummy, F_SETFD, FD_CLOEXEC);92 91 if (hDummy >= 0) 93 pThis->hDummy[i] = hDummy; 92 { 93 if (fcntl(hDummy, F_SETFD, FD_CLOEXEC) == 0) 94 pThis->hDummy[i] = hDummy; 95 else 96 { 97 close(hDummy); 98 LogRel(("Failed to set close on exec [%d] /dev/null! errno=%d\n", i, errno)); 99 } 100 } 94 101 else 95 {96 pThis->hDummy[i] = -1;97 102 LogRel(("Failed to open[%d] /dev/null! errno=%d\n", i, errno)); 98 } 99 } 100 #endif 103 } 101 104 102 105 /* … … 144 147 int suplibOsTerm(PSUPLIBDATA pThis) 145 148 { 146 #ifdef VBOXFLT_DUMMYFILES147 149 /* 148 150 * Close the dummy files first. 149 151 */ 150 for (int i = 0; i < VBOXFLT_DUMMYFILES; i++)152 for (int i = 0; i < SUPLIB_FLT_DUMMYFILES; i++) 151 153 { 152 154 if (pThis->hDummy[i] != -1) … … 156 158 } 157 159 } 158 #endif159 160 160 161 /*
Note:
See TracChangeset
for help on using the changeset viewer.