aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/sledjchisl/sledjchisl.c
diff options
context:
space:
mode:
authoronefang2021-08-04 15:11:21 +1000
committeronefang2021-08-04 15:11:21 +1000
commit08726fe2dcaa7156cfa8c97293d3701bff4f62e6 (patch)
treeff4a7a19d6fb32aa0f07ae0b800b4c727be32064 /src/sledjchisl/sledjchisl.c
parentDon't exit panes, kill them, and quicker. (diff)
downloadopensim-SC-08726fe2dcaa7156cfa8c97293d3701bff4f62e6.zip
opensim-SC-08726fe2dcaa7156cfa8c97293d3701bff4f62e6.tar.gz
opensim-SC-08726fe2dcaa7156cfa8c97293d3701bff4f62e6.tar.bz2
opensim-SC-08726fe2dcaa7156cfa8c97293d3701bff4f62e6.tar.xz
Kill the rest of the panes that are not on the original window.
Diffstat (limited to 'src/sledjchisl/sledjchisl.c')
-rw-r--r--src/sledjchisl/sledjchisl.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c
index 230371b..e779c0c 100644
--- a/src/sledjchisl/sledjchisl.c
+++ b/src/sledjchisl/sledjchisl.c
@@ -8292,6 +8292,26 @@ fcgiDone:
8292 } 8292 }
8293 ourSims->simsLua->unlock(ourSims->simsLua); 8293 ourSims->simsLua->unlock(ourSims->simsLua);
8294 8294
8295 // Kill the rest of the panes that are not on the original window.
8296 snprintf(toybuf, sizeof(toybuf), "echo 'IDs={' >%s/IDs_ALL.lua", scTemp);
8297 system(toybuf);
8298 doTmuxCmd("list-panes -s -F '\"#{window_id}.#{pane_id}\",' >> %s/IDs_ALL.lua", scTemp);
8299 snprintf(toybuf, sizeof(toybuf), "echo '}\nreturn IDs' >>%s/IDs_ALL.lua", scTemp);
8300 system(toybuf);
8301
8302 snprintf(toybuf, sizeof(toybuf), "%s/IDs_ALL.lua", scTemp);
8303 qtreetbl_t *IDs = Lua2tree(toybuf, "IDs");
8304
8305 memset((void*)&obj0, 0, sizeof(obj0));
8306 IDs->lock(IDs);
8307 while(IDs->getnext(IDs, &obj0, false) == true)
8308 {
8309 q0 = obj0.data;
8310 if ('0' != q0->v.s[1])
8311 doTmuxCmd("kill-pane -t %s", q0->v.s);
8312 }
8313 IDs->unlock(IDs);
8314 freeLuaTree(IDs);
8295 char *c = xmprintf("rm -fr %s/*", scTemp); 8315 char *c = xmprintf("rm -fr %s/*", scTemp);
8296 if (!WIFEXITED(system(c))) 8316 if (!WIFEXITED(system(c)))
8297 E("rrm command failed! %s", c); 8317 E("rrm command failed! %s", c);