aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
Commit message (Collapse)AuthorAge
* Remove an assert() in the unix file locking logic that is not truedrh2025-01-20
| | | | | if alternative VFS "unix-excl" is used for a read-only connection. FossilOrigin-Name: bd5dc92368e41231a07bb59dd3db8942e238129ec7a3c8d785459d9b62bfcba3
* Add the SQLITE_FCNTL_NULL_IO file-control.drh2024-11-13
| | | FossilOrigin-Name: f0e917fcf51b59f8ccfe5b9341937341d0e6016eb275d6c33dcb10b0b301a9da
* Change a (#define HAVE_FCHMOD) to (#define HAVE_FCHMOD 1) per user request ↵stephan2024-11-05
| | | | | in [forum:24cf6020c6|forum post 24cf6020c6]. There's no semantic change for this tree, but this is consistent with how auto-config tools would define it and the empty #define interferes with some downstream code. FossilOrigin-Name: 9c46d84f3bf2f5876211b498104067d32a4000979fad1345deb1000c23716d75
* Rename to SQLITE_IOCAP_SUBPAGE_READ.drh2024-10-22
| | | FossilOrigin-Name: dd446ef1816f4e95ce29de0b3841dd0a6c983646fd2dd271c2db8f3263478164
* Add the SQLITE_IOCAP_BYPASS device characteristic. Do not allow thedrh2024-10-22
| | | | | SQLITE_DIRECT_OVERFLOW_READ optimization if that capability is missing. FossilOrigin-Name: f50ae00ce9ff572e6bd5e2788602ba356383526ab7289622a32fbf52926c6df0
* Fix harmless compiler warning in flockCheckReservedLock().drh2024-10-15
| | | FossilOrigin-Name: f369de3d8fa34a403b5c9f6269f7e3fdb16a13784a70460c5032ad4e66615d64
* Fix the xCheckReservedLock() method of the flock VFS to avoid dropping the ↵dan2024-10-09
| | | | | file-lock. FossilOrigin-Name: 8ffaf85249ff38ceea037a6e96b3484c912f1c1aa55b8642297d592768661344
* Resolve a harmless compiler warning in QNX builds.stephan2024-09-26
| | | FossilOrigin-Name: 2916460179c6089375188c6e4e3cff1fca5bbbbb7280a10c919e09e75d1f11f8
* Automatically disable directory fsync when compiling for AIX.drh2024-08-18
| | | FossilOrigin-Name: 8d170e07e20c21a5bb97fdc8c2d01d92178f5fe740e60d203e4621747cfce33e
* Handle the case where unix-dotfile is used with URI parameter nolock=1.dan2024-06-11
| | | FossilOrigin-Name: 3925a5b904e159d54455cfc73fe837a9c6ea3a6d60da63afde3242b4d6f67c90
* Fix a problem with rolling back hot journals using the unix-dotfile VFS.dan2024-06-11
| | | FossilOrigin-Name: 4ae3300b79e03381fd7f1033bb7978bb6367369790f17c3bdacac51e205edaf9
* Modify three #if checks in os_unix.c to improve handling of SQLITE_OMIT_WAL ↵stephan2024-06-03
| | | | | on WASI builds. Based on the discussion in/around [forum:57e918431735128a|forum post 57e918431735128a]. FossilOrigin-Name: 296eeb26c816bc734530cf446922f25be970b901c884df1a98083502f0d1e9f5
* Have os_unix.c reuse cached file-descriptors in the case when a read-write ↵dan2024-03-21
| | | | | fd is requested on a read-only file and a read-only fd returned. FossilOrigin-Name: a678e85402af08c1e387bf30ff2205f84dd7da749755da565d70f831c007a3d9
* Extend the strerror_r() result type discrepancy check in os_unix.c to ↵stephan2024-02-19
| | | | | include the Android NDK, as reported in [forum post 3f13857fa4062301|forum:3f13857fa4062301]. The NDK's strerror_r() signature is version-dependent, whereas this change assumes int return (POSIX semantic) across all versions. FossilOrigin-Name: f18b2524da6bbbcf372b292df52fbe6efa49fd6e1f1f13ef2447279d559f7a08
* In os_unix.c and os_win.c, do not allow xFetch() to return a pointer to a ↵dan2024-01-23
| | | | | page buffer that is right at the end of the mapped region - if the database is corrupted in a specific way such a page buffer might be overread by several bytes. FossilOrigin-Name: 2684feac3bc9c5463604900d72710be861527614f4957224c74a16a3b3c702f5
* Minor change to os_unix.c to facilitate 100% MC/DC testing.drh2024-01-08
| | | FossilOrigin-Name: 0dfa7b4da134db281c3c4eddb4569c53a450f955f0af2f410e13db801aff4ea2
* Fix SQLITE_ENABLE_SETLK_TIMEOUT assert() statements in os_unix.c to avoid ↵dan2023-12-20
| | | | | reading past the end of the unixShmNode.aMutex[] array. FossilOrigin-Name: 029a05cd2928d43d81e4549cce5388c432e2c9e75e3fa0b2fe6e91021b2fb9ac
* In SQLITE_ENABLE_SETLK_TIMEOUT builds, use blocking locks in place of ↵dan2023-11-27
| | | | | sleep() when opening a read-transaction. FossilOrigin-Name: a51ef39998e25e86bd0600e71d15011b12e05f4319608018293bdaecb09e8c97
* When ENABLE_SETLK is defined, avoid ever blocking on the lock mutex in ↵dan2023-11-18
| | | | | os_unix.c when requesting an exclusive lock. FossilOrigin-Name: eb36d475e91bfdbf4a18b6fd9751fbcecf15d960dcd1c00d2d18b5bf1d7503fe
* When SQLITE_ENABLE_SETLK_TIMEOUT is defined, use a separate mutex in ↵dan2023-11-17
| | | | | os_unix.c for each shm locking slot. FossilOrigin-Name: 4098df9652d90f2d22d5591d915d672c5413471f7916223510ba6fd932bfdd36
* Changes so that if SQLITE_ENABLE_SETLK_TIMEOUT is defined as 2 instead of 1, ↵dan2023-11-15
|\ | | | | | | | | all blocking locks are taken for a single millisecond and the default busy-handler invoked as normal. FossilOrigin-Name: 79e24ec3dd40373bbb93792829b18d9ef40daf19d4606174e36c8e19e61a7529
| * Change things so that if SQLITE_ENABLE_SETLK_TIMEOUT is defined as 2 instead ↵dan2020-06-29
| | | | | | | | | | of 1, all blocking locks are taken for a single millisecond and the default busy-handler invoked as normal. FossilOrigin-Name: ac381e6eb3c9284e65f7aad66d21bee1bca9ef4123684ccaf069b8a6d157a56d
* | Fix an assert() that could fail within calls to sqlite3_snapshot_open() in ↵dan2023-11-07
| | | | | | | | | | SQLITE_ENABLE_SETLK_TIMEOUT builds. FossilOrigin-Name: 84634bc268e5c80146f3f3b2e13118f239c9a7e4e4e9dfcaccef2b17252ce53b
* | Fix harmless compiler warnings.drh2023-10-25
| | | | | | FossilOrigin-Name: cc8efe0494b8fe0df18aa67b1675779bf704d1ac53647fe1f7f55d8048041680
* | Unix builds now assume the presence of nanosleep() in the standard library.drh2023-08-03
| | | | | | | | | | | | The -DHAVE_NANOSLEEP=0 compile-time option can be used to build on systems (if any still exist) where this is not the case. FossilOrigin-Name: 779d5dc8797ea246d0397f7e94b1be716b0baa735e8d9f5a6fc4cffd887a7420
* | 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