diff options
author | bptato <nincsnevem662@gmail.com> | 2024-02-14 01:43:59 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-02-14 01:44:26 +0100 |
commit | f0aac2ccd2d0a5c5f734d464bb003df09ec9a19d (patch) | |
tree | cb0df1fdbfad717bf95b880bfa20b580776d828e /src/extern | |
parent | 43fa886a8a9fd414647e7557ed70a9d3b6103cae (diff) | |
download | chawan-f0aac2ccd2d0a5c5f734d464bb003df09ec9a19d.tar.gz |
pager: reduce boilerplate
also spawn less processes in some cases
Diffstat (limited to 'src/extern')
-rw-r--r-- | src/extern/runproc.nim | 4 |
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) |