aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2021-07-07 09:08:20 +1000
committeronefang2021-07-07 09:08:20 +1000
commit4f221621585e3fb6f68801ed8d19526a42c6b490 (patch)
tree610795c18bab461bd137d6124fd123c665186a7c
parentVarious memory freeing stuff. (diff)
downloadopensim-SC-4f221621585e3fb6f68801ed8d19526a42c6b490.zip
opensim-SC-4f221621585e3fb6f68801ed8d19526a42c6b490.tar.gz
opensim-SC-4f221621585e3fb6f68801ed8d19526a42c6b490.tar.bz2
opensim-SC-4f221621585e3fb6f68801ed8d19526a42c6b490.tar.xz
VArious small sledjchisl things.
Complain if we can't remove a stale PID file. Don't wait after ROBUST starts. Do web thing only if it's a plain "start everything".
Diffstat (limited to '')
-rw-r--r--src/sledjchisl/sledjchisl.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c
index 8ab41ab..0ea29a3 100644
--- a/src/sledjchisl/sledjchisl.c
+++ b/src/sledjchisl/sledjchisl.c
@@ -1029,6 +1029,11 @@ int checkSimIsRunning(char *sim)
1029 path = xmprintf("rm -f %s/caches/%s.pid", scRoot, sim); 1029 path = xmprintf("rm -f %s/caches/%s.pid", scRoot, sim);
1030 d("%s", path); 1030 d("%s", path);
1031 i = system(path); 1031 i = system(path);
1032 if (WIFEXITED(i))
1033 {
1034 if (0 != WEXITSTATUS(i)) // No such pid.
1035 E("Cannot remove stale PID file %s", path);
1036 }
1032 } 1037 }
1033 else 1038 else
1034 d("checkSimIsRunning(%s) has PID %s, which is actually running.", sim, pid); 1039 d("checkSimIsRunning(%s) has PID %s, which is actually running.", sim, pid);
@@ -7520,7 +7525,7 @@ T("ARGS - %i |%s| |%s|", currentMode, toys.optargs[0], target);
7520 free(c); 7525 free(c);
7521 waitTmuxText(d, "INITIALIZATION COMPLETE FOR ROBUST"); 7526 waitTmuxText(d, "INITIALIZATION COMPLETE FOR ROBUST");
7522 I("ROBUST is done starting up."); 7527 I("ROBUST is done starting up.");
7523 la = waitLoadAverage(la, loadAverageInc / 3.0, simTimeOut / 3); 7528// la = waitLoadAverage(la, loadAverageInc / 3.0, simTimeOut / 3);
7524 free(d); 7529 free(d);
7525 } 7530 }
7526 7531
@@ -7755,6 +7760,7 @@ sims = -- Note these are .shini / tmux tab short names.
7755 } 7760 }
7756nextSim: 7761nextSim:
7757 number++; 7762 number++;
7763//if (2 < number) break;
7758 } 7764 }
7759 lua_pop(L, 1); // removes 'value'; keeps 'key' for next iteration 7765 lua_pop(L, 1); // removes 'value'; keeps 'key' for next iteration
7760 } 7766 }
@@ -7767,9 +7773,11 @@ nextSim:
7767 } 7773 }
7768 7774
7769 7775
7770 if ((START == currentMode) && checkSimIsRunning("ROBUST")) 7776
7777 if ((START == currentMode) && checkSimIsRunning("ROBUST") && (NULL == target))
7771 { 7778 {
7772 // Start up the web stuff. TODO - remove this once we handle the fcgi stuff ourselves. 7779 // Start up the web stuff. TODO - remove this once we handle the fcgi stuff ourselves.
7780 T("Starting the web stuff.");
7773 char *d = xmprintf("%s.{left}", Ttab); 7781 char *d = xmprintf("%s.{left}", Ttab);
7774 char *c = xmprintf("cd %s/current/src;" 7782 char *c = xmprintf("cd %s/current/src;"
7775 " spawn-fcgi -n -u %s -s %s/sledjchisl.socket -M 0660 -G www-data -- " 7783 " spawn-fcgi -n -u %s -s %s/sledjchisl.socket -M 0660 -G www-data -- "
@@ -7779,6 +7787,8 @@ nextSim:
7779 free(c); 7787 free(c);
7780 free(d); 7788 free(d);
7781 } 7789 }
7790 else
7791 T("NOT Starting the web stuff.");
7782 7792
7783 7793
7784/* 7794/*