aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
Commit message (Collapse)AuthorAge
* Add a C-source spell-checking facility. make misspell (on Nix)larrybr2023-06-07
| | | FossilOrigin-Name: 26c1bb4bd9e9f56613c3aa87407a7f562fd4ebde5bfd6dece02078001d9a45f8
* Automatically set HAVE_PREAD and HAVE_PWRITE on linux, as has been done indrh2023-04-12
| | | | | MacOS for a long time now. FossilOrigin-Name: 2f7a36d2c374100019bd9d38aea51ea10cfcf9b1f0330ba084a75f0773df8ebf
* Merge trunk into wasi-patches branch.stephan2023-02-06
|\ | | | | FossilOrigin-Name: 656d36f50f630da68262469087bad1ac71b10325e233a7963103c8cbc232f61a
| * Fix a comment related to PENDING locks in os_unix.c. No code changes.dan2023-02-01
| | | | | | FossilOrigin-Name: 6b3546c871fe78a4e550e0144b48ac98325787cc8b192a9e7f5f2a2ffa57f76d
| * Fix a race condition during hot-journal rollback that could theoretically ↵dan2023-01-31
| | | | | | | | | | cause spurious corruption errors. FossilOrigin-Name: 20ea53ddf590a9dd19501fabd2bfdb9c10b5eb265cd2995bdb335769c936c763
* | Merge trunk into wasi-patches branch.stephan2023-01-27
|\| | | | | FossilOrigin-Name: 2ce89f5efcdb8b4c58eb2d30833a76d79ae0134c31d5ab8564be9e1cf5a1f4f0
* | Merge trunk into wasi-patches branch and add missing yes/no result to the ↵stephan2023-01-11
|\| | | | | | | | | configure script's output for the --with-wasi-sdk=PATH test. FossilOrigin-Name: adc0ede0a43241b85563408d0de8e640a75ec4f7bdfe5e48acc5cdd6b182b88c
| * Fix handling of unix paths that contain ".." components such that "/" is ↵dan2023-01-10
| | | | | | | | | | considered its own parent directory. FossilOrigin-Name: 3c6cadb396de3981bd950eddd532daa8134bd4bf22c578620e323835c96a8500
* | Merge trunk into wasi-patches branch.stephan2022-12-10
|\| | | | | FossilOrigin-Name: 13dade955d46020ab408734123261e9fadb8bccbaf67003b111112af4789d8c0
| * In the unix backend, when implementing the defenses against small filedrh2022-12-06
| | | | | | | | | | | | | | | | descriptors, delete a file just created if it was opened with O_EXCL|O_CREAT so that it can be created again the next time through the loop. Fix for the problem described by [forum:/forumpost/699af709ab3a8ccf|forum post 699af709ab3a8ccf]. FossilOrigin-Name: c0cfe0582add87981826d124a0763482f51fae4b105b5a970dd56919f1d04d60
| * Always use nanosleep() (instead of usleep() or sleep) if the drh2022-11-30
| | | | | | | | | | _POSIX_C_SOURCE macro says it should be available. FossilOrigin-Name: 6620c57b9d3eae7226a412318b43393196df069b5b90aae0cf1743fdd2d102dd
* | Account for lack of mmap(), getpid(), and shared memory APIs in wasi.stephan2022-11-19
| | | | | | FossilOrigin-Name: 80ff026fb4b2203eea53d4930c1e9bb138db951fb408739c7d5c776fb397b665
* | Preliminary patches to get sqlite3.c building as-is in WASI environments.stephan2022-11-19
|/ | | FossilOrigin-Name: 19c04d71bf0f2f44d5a03288cbea3f63cf4eae2fa018ac6be4ae49a321e2b2f3
* Include the kv-vfs as an optional VFS on unix builds if thedrh2022-09-17
| | | | | SQLITE_OS_KV_OPTIONAL compile-time option is present. FossilOrigin-Name: 852812d1e2ec3c53ad7c6c64662b37d861fefcf1baeee3d58eba88bcb3f6d8df
* Fix the <sys/time.h> include in os_kv.c.drh2022-09-12
| | | FossilOrigin-Name: 878cc93e779c3857adc711f212520f007256274fcd3f6f3d72c754a937fcd198
* Fix the amalgamation so that it builds with the standard unix backend again.drh2022-09-12
| | | FossilOrigin-Name: 0adf158f4e5791339988185cc29347c75056b062e0db65b5999fdfa1f433c1ed
* Experimental changes to put sqlite3_temp_directory behind a mutex.drh2022-09-02
| | | FossilOrigin-Name: 5ee3515fbb88bf1ae5f8b507844f82dcc429380b6ebeab9b09b52b25ee60a60d
* Add the (undocumented) SQLITE_DEFAULT_UNIX_VFS compile-time option.drh2022-08-12
| | | FossilOrigin-Name: 49828bdec5f926cd18a069d39a5db0b1e1f3528a2affcfbaa1cf7b98aca51b3b
* Fix harmless compiler warnings in the new unixFullPathname implementation.drh2022-05-17
| | | FossilOrigin-Name: f7e1ceb5b59a876cfd04a8aac0ee2b322c970555b9c361b4953d711ef6596e37
* Use osReadlink() in os_unix.c, not readlink() directly.drh2022-05-11
| | | FossilOrigin-Name: c3da4c1611cebd9f9d695892a3ffddc47d5f0db1a1ea8bd2b4f83ef7673b68de
* For the unix VFS, rewrite the xFullPathname method so that it automaticallydrh2022-05-11
| | | | | | resolves all symbolic links, rendering a canonical pathname that contains no symlinks. FossilOrigin-Name: 40c9273d0e0e74e1df22e996a5d486e838f4320defd2121e2d95eeed8aea6235
* Harden the xShmLock method of both the unix and Windows VFSes so that theydrh2022-03-22
| | | | | are robust against being invoked when the SHM file is not open. FossilOrigin-Name: 67d8b434f628d44c4a90ce8ff5ab2e381f500bb42bdbfab9a17d21925a2ec6cd
* Improve the defenses against bad pathnames input into the findCreateFileMode()drh2022-03-09
| | | | | | | function of os_unix.c in order to quiet static-analyzer warnings. There are no demonstrated problems in the prior code, but this change makes the code easier to prove correct and more robust against future changes. FossilOrigin-Name: a9cda38997a692e25d2fe994a9a3fb9472c00ba04323c82e706fdb1112d4244e
* Fix a benign data race in os_unix.c that might trouble tsan and similar tools.dan2021-11-19
| | | FossilOrigin-Name: 95806ac1dabe4598170061d903ae30f09bafac149ff6696963a7e056ac846cdb
* Add #ifdef logic to os_unix.c so that it builds with SQLITE_OMIT_WAL defined.dan2021-11-02
| | | FossilOrigin-Name: 948c2cb2a2f44ba069cfbf5e9a57e56964f3a40db57459bb439bea9c3bd9f211
* Provide an assert() to fire for applications that should never open or createdrh2021-10-23
| | | | | a disk-based database file. FossilOrigin-Name: 5218ac788ca35fdd7f98117758f0bef9d55fe7517098e7bf62fda3fed2af3d51
* Back out the SQLITE_OPEN_EXCLUSIVE changes because it does not work ondrh2021-10-13
| | | | | Windows and it does not work always on unix. FossilOrigin-Name: d008ad793dfb11c287f366377cbc561acedef6c9d08b1557f463484eda41a84e
* Allow the SQLITE_OPEN_EXCLUSIVE flag in sqlite3_open(). Return thedrh2021-06-24
| | | | | | SQLITE_CANTOPEN_EXISTS extended code to indicate that the open failed because the database already exists. FossilOrigin-Name: d091150ff80709a1e50e0431aa33021f036979e4a88e9769eeec431dfad6d5f5
* Fix some minor #ifdef issues so that all of the supported compile-timedrh2021-06-15
| | | | | options continue to build. FossilOrigin-Name: d8cf407046f20b0398f19acd0dab6acb6c742911e21e1003cb5b194dd668d98e
* Fix a formatting error on the comment.drh2021-05-19
| | | FossilOrigin-Name: 6f2fb60e499fc758bea6ffec030fef8ab5f97d08d31450f0b3ffafc20e652891
* Add a table of shared-memory lock offsets in a comment in the os_unix.c code.drh2021-05-19
| | | | | Include some assert()s to help verify the numbers. FossilOrigin-Name: b480aacb3430a789d98ffd81a1886bbbc3cda5b0e736ec9a3e2b463db2a3b3ad
* Add experimental SQLITE_FCNTL_EXTERNAL_READER file control.dan2021-04-02
| | | FossilOrigin-Name: e16da5af822ef31d7e05992403cf9787fbb3d9abb0b5283aba55ea07e1830a72
* Fix a problem with the filename normalizer in unix, discovered by dbsqlfuzz.drh2021-03-18
| | | FossilOrigin-Name: ff1eca7fcdcbc550a5f23db9d85281e5373500912699a7c7ae54bc0df0547e26
* In os_unix.c, put ALWAYS() on unreachable branches associated with pathnamedrh2020-11-23
| | | | | normalization. FossilOrigin-Name: b45a08e3c7edfa76b699d3e29f28daa5bd08039668ec57121e4e85edf36150f1
* The xFullPathname method of the unix VFS now normalizes the filenames bydrh2020-11-19
|\ | | | | | | | | omitting surplus "/", "/./" and "/../" strings. FossilOrigin-Name: c38dec6f52c01614c1bee8356daf0fcd9f708d029116e9bff51e06719a730dde
| * Enhance the unix VFS so that it removes extra "/", "/./" and "/../" fromdrh2020-11-16
| | | | | | | | | | the database filename. FossilOrigin-Name: 7ba89d3e5c68d970ed26c2ec6e6e34bae535c2cc0b22a022d20ac9ff4527b8ab
* | Improvements to the mechanism that attempts to report SQLITE_CORRUPT ifdrh2020-11-18
| | | | | | | | | | pread() says that the underlying filesystem is corrupt. FossilOrigin-Name: b887c7504e7edeba758f3c1203c6cc56eef499fe05e7e6c6d82939bf7d78c57f
* | On unix, for certain error codes of read()/pread() returndrh2020-11-18
|/ | | | | | SQLITE_IOERR_CORRUPTFS instead of SQLITE_IOERR_READ. And then convert this error into SQLITE_CORRUPT prior to returning back to the application. FossilOrigin-Name: 9538ea8447e7b07c05197d6ff2208d3e97b45798736c85b63e8f0c7a3a98c1f3
* Add ALWAYS() to conditionals associated with SHM locking that are always true.drh2020-11-06
| | | FossilOrigin-Name: b599e89076d60afede7d2b3503b9338ca863d0c2d25799afe4080a6186386ea9
* Do not invoke usleep() for more than 999999 microseconds.drh2020-09-15
| | | FossilOrigin-Name: 1f5ed852f25515bbc0a7aaf236fdef40fa7e31805eee1249277fde4e68f95130
* Ensure that the busy-handler count is reset at the end of each ↵dan2020-09-04
| | | | | sqlite3_file_control() and sqlite3_prepare() (and _v2() and _v3()). FossilOrigin-Name: 5dd05940617fb05ee2faf212b15afc3a8e9695318eccb76761b37359fea681d1
* Fix handling of an xShmLock(SHARED, UNLOCK) call when the caller does not ↵dan2020-08-28
| | | | | hold any lock on the specified slot, but another connection in the same process holds an EXCLUSIVE. FossilOrigin-Name: 3eb365027b885e1f61965efd53a3643b6ff441ae01e79038a091314516a50dd4
* Modify the unixShmLock() function to avoid iterating through the (possibly ↵dan2020-08-28
| | | | | large) set of connections to the same database file. FossilOrigin-Name: e0faddf0dfc3a40b6b94408296dd781dd0264ecc9f2129ce4405438433fb00e0
* Try to make SQLite easier to compiler for Mac Catalyst. See drh2020-08-19
| | | | | [https://sqlite.org/forum/forumpost/803387a1c5|forum post 803387a1c5]. FossilOrigin-Name: e1595a20d71e61957944cc2b634578968cda8fba08a1f1e75edba20dc9c6080b
* Fix other potentiall pointer aliasing problems associated with subclassingdrh2020-07-24
| | | | | of the sqlite3_file object for various VFS implementations. FossilOrigin-Name: 270ac1a0f232d75537be40abae559004e950b992cb2c7e94cd6de66e96ae17bd
* Extend the refactoring into extensions. Clean up stray newlines.drh2020-06-19
| | | FossilOrigin-Name: 7a876209a678a34c198b54ceef9e3c041f128a14dc73357f6a57cadadaa6cf7b
* Refactoring various names. No changes in the resulting machine code.drh2020-06-19
| | | FossilOrigin-Name: 7bb08b1bfcf184e4b59c8c9028926a0052612ff6a6731914ccdb8dee07ea4a98
* Expand upon a comment in os_unix.c. No changes to code.dan2020-05-29
| | | FossilOrigin-Name: 77933dc4dbe0e0af3b13a14293a8bd684edc5056f4ae9291c6f95d4433bf90ce
* Fix a problem preventing building without SQLITE_ENABLE_SETLK_TIMEOUT defined.dan2020-05-06
| | | FossilOrigin-Name: 98eb54c6d83992886f17a00b6fc8998df230e3b5f45bafc6fae0d15a9ee5a4c6
* Add error code SQLITE_BUSY_TIMEOUT, used internally by the OS layer to ↵dan2020-05-06
| | | | | indicate that a call to xShmLock() has failed due to timeout of a blocking lock. FossilOrigin-Name: f3ef9c7c2b4ba3de1057ad569f068b241d5f23e6629d8e0dacf85e57fd13b8aa