about summary refs log tree commit diff stats
path: root/src/utils
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-07-02 16:56:33 +0200
committerbptato <nincsnevem662@gmail.com>2024-07-02 17:50:10 +0200
commit02b549ee0c7bda8ad110eba6aac14bafb10d45e3 (patch)
tree4628d8fbba059098f7e6fdc78fd3ab5070cb8820 /src/utils
parentc69f9f6c1bc18b718a8c8deb11934cca19929e02 (diff)
downloadchawan-02b549ee0c7bda8ad110eba6aac14bafb10d45e3.tar.gz
pager: PNGify kitty images, clear images on buffer switch
Saves bandwidth; it's especially useful over SSH. Still not sure if this
is the right solution, since it now needs two select cycles instead
of one, and it does yet another copy of the image. (Unnecessarily,
because stbi cannot stream its output, and stbiw cannot stream its
input.)

Also, to save memory, we now discard decoded images of buffers that are
not being viewed.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/sandbox.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/sandbox.nim b/src/utils/sandbox.nim
index d4312a49..a700ea2e 100644
--- a/src/utils/sandbox.nim
+++ b/src/utils/sandbox.nim
@@ -127,7 +127,7 @@ elif defined(linux) and not disableSandbox:
     onSignal SIGSYS:
       discard sig
       raise newException(Defect, "Sandbox violation in network process")
-    let ctx = seccomp_init(SCMP_ACT_KILL_PROCESS)
+    let ctx = seccomp_init(SCMP_ACT_TRAP)
     doAssert pointer(ctx) != nil
     const allowList = [
       cstring"close", "exit_group", # duh