Skip to content
Snippets Groups Projects
Commit 0d8ef460 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Revert "Temporary debug to find out where/why jsexec is hanging during mac mini m4 CI test"

This reverts commit ebe52737.
parent e8a981d7
No related branches found
No related tags found
No related merge requests found
Pipeline #7811 passed
...@@ -1203,14 +1203,12 @@ int main(int argc, char **argv) ...@@ -1203,14 +1203,12 @@ int main(int argc, char **argv)
struct sigaction sa = {0}; struct sigaction sa = {0};
#endif #endif
printf("%s %d\n", __FILE__, __LINE__);
confp = stdout; confp = stdout;
errfp = stderr; errfp = stderr;
if ((nulfp = fopen(_PATH_DEVNULL, "w+")) == NULL) { if ((nulfp = fopen(_PATH_DEVNULL, "w+")) == NULL) {
perror(_PATH_DEVNULL); perror(_PATH_DEVNULL);
return do_bail(-1); return do_bail(-1);
} }
printf("%s %d\n", __FILE__, __LINE__);
if (isatty(fileno(stdin))) { if (isatty(fileno(stdin))) {
#ifdef __unix__ #ifdef __unix__
tcgetattr(fileno(stdin), &orig_term); tcgetattr(fileno(stdin), &orig_term);
...@@ -1221,25 +1219,21 @@ int main(int argc, char **argv) ...@@ -1221,25 +1219,21 @@ int main(int argc, char **argv)
else /* if redirected, don't send status messages to stderr */ else /* if redirected, don't send status messages to stderr */
statfp = nulfp; statfp = nulfp;
printf("%s %d\n", __FILE__, __LINE__);
cb.limit = JAVASCRIPT_TIME_LIMIT; cb.limit = JAVASCRIPT_TIME_LIMIT;
cb.yield_interval = JAVASCRIPT_YIELD_INTERVAL; cb.yield_interval = JAVASCRIPT_YIELD_INTERVAL;
cb.gc_interval = JAVASCRIPT_GC_INTERVAL; cb.gc_interval = JAVASCRIPT_GC_INTERVAL;
cb.auto_terminate = true; cb.auto_terminate = true;
cb.events = NULL; cb.events = NULL;
printf("%s %d\n", __FILE__, __LINE__);
DESCRIBE_COMPILER(compiler); DESCRIBE_COMPILER(compiler);
memset(&scfg, 0, sizeof(scfg)); memset(&scfg, 0, sizeof(scfg));
scfg.size = sizeof(scfg); scfg.size = sizeof(scfg);
printf("%s %d\n", __FILE__, __LINE__);
if (!winsock_startup()) if (!winsock_startup())
return do_bail(2); return do_bail(2);
#ifndef JSDOOR #ifndef JSDOOR
printf("%s %d\n", __FILE__, __LINE__);
SAFECOPY(scfg.ctrl_dir, get_ctrl_dir(/* warn: */ false)); SAFECOPY(scfg.ctrl_dir, get_ctrl_dir(/* warn: */ false));
iniFileName(ini_fname, sizeof(ini_fname), scfg.ctrl_dir, "jsexec.ini"); iniFileName(ini_fname, sizeof(ini_fname), scfg.ctrl_dir, "jsexec.ini");
if ((fp = iniOpenFile(ini_fname, /* for_modify: */ false)) != NULL) { if ((fp = iniOpenFile(ini_fname, /* for_modify: */ false)) != NULL) {
...@@ -1251,7 +1245,6 @@ int main(int argc, char **argv) ...@@ -1251,7 +1245,6 @@ int main(int argc, char **argv)
get_ini_values(ini, /* section (global): */ NULL, &cb); get_ini_values(ini, /* section (global): */ NULL, &cb);
#endif #endif
printf("%s %d\n", __FILE__, __LINE__);
if (getcwd(orig_cwd, sizeof(orig_cwd)) == NULL) { if (getcwd(orig_cwd, sizeof(orig_cwd)) == NULL) {
fprintf(stderr, "Error %d (%s) getting cwd\n", errno, strerror(errno)); fprintf(stderr, "Error %d (%s) getting cwd\n", errno, strerror(errno));
return do_bail(1); return do_bail(1);
...@@ -1276,7 +1269,6 @@ int main(int argc, char **argv) ...@@ -1276,7 +1269,6 @@ int main(int argc, char **argv)
errfp = fopen("error.log", "a"); errfp = fopen("error.log", "a");
#endif #endif
printf("%s %d\n", __FILE__, __LINE__);
for (argn = 1; argn < argc && module == NULL && js_buf == NULL; argn++) { for (argn = 1; argn < argc && module == NULL && js_buf == NULL; argn++) {
if (argv[argn][0] == '-') { if (argv[argn][0] == '-') {
p = argv[argn] + 2; p = argv[argn] + 2;
...@@ -1446,12 +1438,10 @@ int main(int argc, char **argv) ...@@ -1446,12 +1438,10 @@ int main(int argc, char **argv)
get_ini_values(ini, ini_section, &cb); get_ini_values(ini, ini_section, &cb);
#endif #endif
} }
printf("%s %d\n", __FILE__, __LINE__);
if (umask_val >= 0) if (umask_val >= 0)
umask(umask_val); umask(umask_val);
printf("%s %d\n", __FILE__, __LINE__);
if (module == NULL && js_buf == NULL && isatty(fileno(stdin))) { if (module == NULL && js_buf == NULL && isatty(fileno(stdin))) {
fprintf(stderr, "\n!No JavaScript module-name or expression specified\n"); fprintf(stderr, "\n!No JavaScript module-name or expression specified\n");
usage(); usage();
...@@ -1459,9 +1449,7 @@ int main(int argc, char **argv) ...@@ -1459,9 +1449,7 @@ int main(int argc, char **argv)
return do_bail(1); return do_bail(1);
} }
printf("%s %d\n", __FILE__, __LINE__);
banner(statfp); banner(statfp);
printf("%s %d\n", __FILE__, __LINE__);
#ifdef JSDOOR #ifdef JSDOOR
SAFECOPY(scfg.temp_dir, "./temp"); SAFECOPY(scfg.temp_dir, "./temp");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment