aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/sledjchisl/sledjchisl.c
diff options
context:
space:
mode:
authoronefang2021-07-24 01:10:52 +1000
committeronefang2021-07-24 01:10:52 +1000
commitcf98469d5df88070f552ca83a61641f7c1508fb8 (patch)
tree683f429e6e5fbf69cb6159009fa40342fbdd6202 /src/sledjchisl/sledjchisl.c
parentNo need to wait for things to settle after starting ROBUST. (diff)
downloadopensim-SC-cf98469d5df88070f552ca83a61641f7c1508fb8.zip
opensim-SC-cf98469d5df88070f552ca83a61641f7c1508fb8.tar.gz
opensim-SC-cf98469d5df88070f552ca83a61641f7c1508fb8.tar.bz2
opensim-SC-cf98469d5df88070f552ca83a61641f7c1508fb8.tar.xz
Don't join the tmux session if we don't have to.
Diffstat (limited to '')
-rw-r--r--src/sledjchisl/sledjchisl.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c
index 9342faf..e6caa67 100644
--- a/src/sledjchisl/sledjchisl.c
+++ b/src/sledjchisl/sledjchisl.c
@@ -6983,14 +6983,14 @@ jit library is loaded or the JIT compiler will not be activated.
6983 if (!WIFEXITED(i)) 6983 if (!WIFEXITED(i))
6984 E("tmux select-pane command failed!"); 6984 E("tmux select-pane command failed!");
6985 } 6985 }
6986 // Join the session.
6987 memset(toybuf, 0, sizeof(toybuf));
6988 snprintf(toybuf, sizeof(toybuf), "%s %s/%s select-window -t '%s' \\; attach-session -t '%s'", Tcmd, scRun, Tsocket, Tconsole, Tconsole);
6989 i = system(toybuf);
6990 if (!WIFEXITED(i))
6991 E("tmux attach-session command failed! %s", toybuf);
6992 goto finished;
6986 } 6993 }
6987 // Join the session.
6988 memset(toybuf, 0, sizeof(toybuf));
6989 snprintf(toybuf, sizeof(toybuf), "%s %s/%s select-window -t '%s' \\; attach-session -t '%s'", Tcmd, scRun, Tsocket, Tconsole, Tconsole);
6990 i = system(toybuf);
6991 if (!WIFEXITED(i))
6992 E("tmux attach-session command failed! %s", toybuf);
6993 goto finished;
6994 } 6994 }
6995 else 6995 else
6996 E("tmux list-sessions command failed! %s", toybuf); 6996 E("tmux list-sessions command failed! %s", toybuf);
@@ -7549,6 +7549,17 @@ fcgiDone:
7549 I("ROBUST is done starting up."); 7549 I("ROBUST is done starting up.");
7550 free(d); 7550 free(d);
7551 } 7551 }
7552 else if ((0 == toys.optc) && (checkSimIsRunning("ROBUST")))
7553 {
7554 // Join the session.
7555 doTmuxCmd("select-window -t '%s' \\; attach-session -t '%s'", Tconsole, Tconsole);
7556// memset(toybuf, 0, sizeof(toybuf));
7557// snprintf(toybuf, sizeof(toybuf), "%s %s/%s select-window -t '%s' \\; attach-session -t '%s'", Tcmd, scRun, Tsocket, Tconsole, Tconsole);
7558// i = system(toybuf);
7559// if (!WIFEXITED(i))
7560// E("tmux attach-session command failed! %s", toybuf);
7561 goto finished;
7562 }
7552 7563
7553/* 7564/*
7554sims = -- Note these are .shini / tmux tab short names. 7565sims = -- Note these are .shini / tmux tab short names.