about summary refs log tree commit diff stats
path: root/src/extern
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-02-14 01:43:59 +0100
committerbptato <nincsnevem662@gmail.com>2024-02-14 01:44:26 +0100
commitf0aac2ccd2d0a5c5f734d464bb003df09ec9a19d (patch)
treecb0df1fdbfad717bf95b880bfa20b580776d828e /src/extern
parent43fa886a8a9fd414647e7557ed70a9d3b6103cae (diff)
downloadchawan-f0aac2ccd2d0a5c5f734d464bb003df09ec9a19d.tar.gz
pager: reduce boilerplate
also spawn less processes in some cases
Diffstat (limited to 'src/extern')
-rw-r--r--src/extern/runproc.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/extern/runproc.nim b/src/extern/runproc.nim
index 4b2ec013..7982dbda 100644
--- a/src/extern/runproc.nim
+++ b/src/extern/runproc.nim
@@ -52,3 +52,7 @@ proc runProcessInto*(cmd, ins: string): bool =
   if rv == -1:
     return false
   return rv == 0
+
+proc myExec*(cmd: string) =
+  discard execl("/bin/sh", "sh", "-c", cmd, nil)
+  quit(127)