From e4caf08affb0f6643041aa70fddd7fecc766a60a Mon Sep 17 00:00:00 2001 From: mirabilos Date: Thu, 9 Nov 2023 00:27:39 +0100 Subject: [PATCH] add devattach.sh for convenience --- .gitignore | 1 + DEVNOTES | 8 ++++++++ devattach.sh | 23 +++++++++++++++++++++++ mrun.sh | 3 +++ run.sh | 3 +++ 5 files changed, 38 insertions(+) create mode 100644 .gitignore create mode 100755 devattach.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..07ed473 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.pid diff --git a/DEVNOTES b/DEVNOTES index 7c2be63..7061928 100644 --- a/DEVNOTES +++ b/DEVNOTES @@ -10,13 +10,21 @@ Attach to a running instance: 2. Attach another server on a different port, when code-testing: $ .pid + # run python subprocess produce { trap - EXIT diff --git a/run.sh b/run.sh index f7a1dbb..3cd0ab5 100755 --- a/run.sh +++ b/run.sh @@ -84,6 +84,7 @@ shpid= function cleanup { print -ru2 -- I: run.sh: cleaning up trap - EXIT + rm -f .pid [[ -z $pypid ]] || xsendsig "$pypid" -INT [[ -z $shpid ]] || xsendsig "$shpid" -INT exit "$1" @@ -91,6 +92,8 @@ function cleanup { trap 'cleanup 0' INT trap 'cleanup 1' EXIT TERM +echo $$ >.pid + # run python subprocess produce { trap - EXIT