aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/sledjchisl/sledjchisl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sledjchisl/sledjchisl.c')
-rw-r--r--src/sledjchisl/sledjchisl.c35
1 files changed, 19 insertions, 16 deletions
diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c
index cda4c57..8b63866 100644
--- a/src/sledjchisl/sledjchisl.c
+++ b/src/sledjchisl/sledjchisl.c
@@ -1519,25 +1519,24 @@ void prepSims(simData *simd, char *type, int count, int window, int panes, int p
1519 simd->pane = pane; 1519 simd->pane = pane;
1520 1520
1521 // Make sure all tmux windows and panes are startned. 1521 // Make sure all tmux windows and panes are startned.
1522 // The bash invocations are so that the PATH is properly propagated.
1523 if (0 == panes) 1522 if (0 == panes)
1524 doTmuxCmd("split-window -hp 50 -d -t '%s:0.1' bash", Tconsole); 1523 doTmuxCmd("split-window -hp 50 -d -t '%s:0.1'", Tconsole);
1525 else if (0 == pane) 1524 else if (0 == pane)
1526 { 1525 {
1527 doTmuxCmd("new-window -dc '%s/current/bin' -n '%s' -t '%s:%d' bash", scRoot, type, Tconsole, window); 1526 doTmuxCmd("new-window -dc '%s/current/bin' -n '%s' -t '%s:%d'", scRoot, type, Tconsole, window);
1528 if (2 <= panes) 1527 if (2 <= panes)
1529 doTmuxCmd("split-window -hp 50 -d -t '%s:%d.0' bash", Tconsole, window); 1528 doTmuxCmd("split-window -hp 50 -d -t '%s:%d.0'", Tconsole, window);
1530 if (4 <= panes) 1529 if (4 <= panes)
1531 { 1530 {
1532 doTmuxCmd("split-window -vp 50 -d -t '%s:%d.1' bash", Tconsole, window); 1531 doTmuxCmd("split-window -vp 50 -d -t '%s:%d.1'", Tconsole, window);
1533 doTmuxCmd("split-window -vp 50 -d -t '%s:%d.0' bash", Tconsole, window); 1532 doTmuxCmd("split-window -vp 50 -d -t '%s:%d.0'", Tconsole, window);
1534 } 1533 }
1535 if (8 <= panes) 1534 if (8 <= panes)
1536 { 1535 {
1537 doTmuxCmd("split-window -hp 50 -d -t '%s:%d.3' bash", Tconsole, window); 1536 doTmuxCmd("split-window -hp 50 -d -t '%s:%d.3'", Tconsole, window);
1538 doTmuxCmd("split-window -hp 50 -d -t '%s:%d.2' bash", Tconsole, window); 1537 doTmuxCmd("split-window -hp 50 -d -t '%s:%d.2'", Tconsole, window);
1539 doTmuxCmd("split-window -hp 50 -d -t '%s:%d.1' bash", Tconsole, window); 1538 doTmuxCmd("split-window -hp 50 -d -t '%s:%d.1'", Tconsole, window);
1540 doTmuxCmd("split-window -hp 50 -d -t '%s:%d.0' bash", Tconsole, window); 1539 doTmuxCmd("split-window -hp 50 -d -t '%s:%d.0'", Tconsole, window);
1541 } 1540 }
1542 } 1541 }
1543 1542
@@ -7468,9 +7467,12 @@ jit library is loaded or the JIT compiler will not be activated.
7468 I("Not running inside the proper tmux server, starting it."); 7467 I("Not running inside the proper tmux server, starting it.");
7469 snprintf(toybuf, sizeof(toybuf), 7468 snprintf(toybuf, sizeof(toybuf),
7470 // Set x,y to huge values, to work around an OpenSim bug. 7469 // Set x,y to huge values, to work around an OpenSim bug.
7471 "export PATH='%s:$PATH'; %s %s/%s new-session -d -x 256 -y 420 -s %s -n '%s' bash -c 'export PATH=%s:$PATH; bash' \\; split-window -vp 50 -t '%s:' " 7470 // bash -c "bash -c '...; bash'" coz sudo, su, runuser, and start-stop-daemon insist. Pffft
7472 "bash -c 'export PATH=%s:$PATH; /usr/bin/valgrind --leak-check=full ./sledjchisl; cd %s/current/bin; bash'", 7471 // Double the export PATH='%s:$PATH coz tmux sucks at that.
7473 scBin, Tcmd, scRun, Tsocket, Tconsole, Ttab, scBin, Tconsole, scBin, scBin, scRoot); 7472 "bash -c \"%s %s/%s set-option -g default-command 'export PATH=%s:$PATH; bash'\\; "
7473 "new-session -d -x 256 -y 420 -s %s -n '%s' \\; "
7474 "split-window -vp 50 -t '%s:' bash -c 'export PATH=%s:$PATH; /usr/bin/valgrind --leak-check=full ./sledjchisl; cd %s/current/bin; bash'\"",
7475 Tcmd, scRun, Tsocket, scBin, Tconsole, Ttab, Tconsole, scBin, scBin, scRoot);
7474 } 7476 }
7475 else 7477 else
7476 { 7478 {
@@ -7479,9 +7481,10 @@ jit library is loaded or the JIT compiler will not be activated.
7479 // After the session is created, we rely on the scRun directory to be group sticky, so that anyone in the opensim group can attach to the tmux socket. 7481 // After the session is created, we rely on the scRun directory to be group sticky, so that anyone in the opensim group can attach to the tmux socket.
7480 snprintf(toybuf, sizeof(toybuf), 7482 snprintf(toybuf, sizeof(toybuf),
7481 // Set x,y to huge values, to work around an OpenSim bug. 7483 // Set x,y to huge values, to work around an OpenSim bug.
7482 "sudo -Hu %s %s %s/%s new-session -d -x 256 -y 420 -s %s -n '%s' bash -c 'export PATH=%s:$PATH; bash' \\; split-window -vp 50 -t '%s:' " 7484 "sudo -Hu %s %s %s/%s set-option -g default-command 'export PATH=%s:$PATH; bash'\\; "
7483 "bash -c 'export PATH=%s:$PATH; /usr/bin/valgrind --leak-check=full ./sledjchisl; cd %s/current/bin; bash'", 7485 "new-session -d -x 256 -y 420 -s %s -n '%s' \\; "
7484 scUser, Tcmd, scRun, Tsocket, Tconsole, Ttab, scBin, Tconsole, scBin, scRoot); 7486 "split-window -vp 50 -t '%s:' bash -c 'export PATH=%s:$PATH; /usr/bin/valgrind --leak-check=full ./sledjchisl; cd %s/current/bin; bash'",
7487 scUser, Tcmd, scRun, Tsocket, scBin, Tconsole, Ttab, Tconsole, scBin, scRoot);
7485 } 7488 }
7486 i = system(toybuf); 7489 i = system(toybuf);
7487 if (!WIFEXITED(i)) 7490 if (!WIFEXITED(i))