about summary refs log tree commit diff stats
path: root/src/local/client.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-01-29 13:13:00 +0100
committerbptato <nincsnevem662@gmail.com>2024-01-29 13:24:58 +0100
commit619d5296dbfc77c37c13b86e4e96c356f1c3f61a (patch)
tree3f4c265b6eb142159a98874efa814277ece3dc89 /src/local/client.nim
parentf9c74eac1260cd02302a70adaa4806c297428163 (diff)
downloadchawan-619d5296dbfc77c37c13b86e4e96c356f1c3f61a.tar.gz
client: stop entire process group on suspend()
* pass 0 so e.g. git does not hang
* use sigtstp so e.g. cgi scripts can clean up if needed
Diffstat (limited to 'src/local/client.nim')
-rw-r--r--src/local/client.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/local/client.nim b/src/local/client.nim
index 960e2f1a..efc838f4 100644
--- a/src/local/client.nim
+++ b/src/local/client.nim
@@ -154,7 +154,7 @@ proc command(client: Client, src: string) =
 
 proc suspend(client: Client) {.jsfunc.} =
   client.pager.term.quit()
-  discard kill(client.mainproc, cint(SIGSTOP))
+  discard kill(0, cint(SIGTSTP))
   client.pager.term.restart()
 
 proc quit(client: Client, code = 0) {.jsfunc.} =