Kovid Goyal
334adf9c1a
Ensure temp files and other resources are cleaned up even if kitty crashes or is SIGKILLed
2025-01-05 12:51:59 +05:30
Kovid Goyal
c280a28155
Dont use os.Remove on failures in syscall_shm
...
Use shm_unlink instead
2023-09-23 11:16:30 +05:30
Kovid Goyal
24598b846c
...
2023-09-23 11:09:51 +05:30
Kovid Goyal
dc43f0d42f
...
2023-09-23 11:08:55 +05:30
Kovid Goyal
5fede41205
Always use fallocate() on Linux for SHM creation
2023-09-23 10:55:15 +05:30
Kovid Goyal
6619bf33b0
Using fcntl() based fallocate on darwin doesnt work with file descriptors returned by shm_open
2023-09-23 10:39:10 +05:30
Kovid Goyal
38bac98c12
Fix build of fallocate_darwin.go
2023-09-23 10:08:04 +05:30
Kovid Goyal
2e4f3dab41
Use fallocate() rather than truncate() when creating SHM memory
...
With truncate() the OS might not actually allocate the space leading to
a SIGBUS if /dev/shm runs out of space when actually using the mmap.
By using fallocate we ensure that once the SHM mmap is created it wont
fail
2023-09-23 09:53:17 +05:30
Kovid Goyal
341d845b9a
Port calls to slices.Sort functions since they now need a cmp() function rather than a less() function
...
Also rename os.SEEK_* to io.Seek* as the former has been deprecated
2023-08-04 22:50:13 +05:30
Kovid Goyal
5b46d990a2
Add Read/Write to the MMap interface
2023-02-28 19:01:15 +05:30
Kovid Goyal
944e036611
DRYer
2023-02-28 15:48:04 +05:30
Kovid Goyal
1b2fe90ed1
Fix askpass.go on shm_syscall based systems
2023-02-28 14:11:27 +05:30
Kovid Goyal
ba1ce996bb
Fix WriteWithSize() on shm_syscall
2023-02-28 13:50:06 +05:30
Kovid Goyal
ce12fd3515
Fix ReadWithSizeAndUnlink on systems that have syscall based mmap
2023-02-28 13:44:09 +05:30
Kovid Goyal
6b71b58997
Add write API to shm objects
2023-02-26 08:01:03 +05:30
Kovid Goyal
d656017f27
Move SSH askpass implementation into kitten
2023-02-26 08:01:02 +05:30
Kovid Goyal
fbaaca1be9
Function to create symlinks atomically
2023-02-26 08:01:02 +05:30
Kovid Goyal
88077fdbcd
Allow Stat() for MMap objects
2023-02-26 08:01:02 +05:30
Kovid Goyal
5a8d903a4d
Go SHM API to read simple data with size from SHM name
2023-02-26 08:01:02 +05:30
Kovid Goyal
1d45cf4f91
Use crypto/rand rather than math/rand
...
Who knows how random math/rand actually is
2023-02-02 06:04:17 +05:30
Kovid Goyal
bd13238d9b
Should only return ENOTSUPP if SHM_DIR doesnt exist, not the fil we are trying to open
2023-01-21 17:46:37 +05:30
Kovid Goyal
dc0093cb51
SHM FS: Return a not supported error if SHM_DIR does not exist
2023-01-21 17:40:59 +05:30
Kovid Goyal
5562a4d52f
Get file mode transmission working for unmodified PNG
2023-01-05 19:15:11 +05:30
Kovid Goyal
a757587ea2
Fix SHM on OpenBSD
2023-01-05 19:15:10 +05:30
Kovid Goyal
2d1a2c30bf
MMap.Name() should return the SHM name not the full filesystem path
2023-01-05 19:15:10 +05:30
Kovid Goyal
6ace082bc2
Add openbsd and dragonfly support to shm
2023-01-05 19:15:10 +05:30
Kovid Goyal
7e161ea94b
Get syscall based SHM working
2023-01-05 19:15:10 +05:30
Kovid Goyal
d01d5297b8
Start work on a SHM implementation in Go
2023-01-05 19:15:10 +05:30