X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fruntime.c;h=5bf3f4db8b5a87ea35b8b62a6da9bdaa30d2739d;hb=230707c1899c1c008f7ce2ad97e2fd04849f7443;hp=50a5ba8bc24b1ab114299898730d8ba508853ad7;hpb=baa0eaf21221dc564088c37b228c620c298aeaa1;p=sbcl.git diff --git a/src/runtime/runtime.c b/src/runtime/runtime.c index 50a5ba8..5bf3f4d 100644 --- a/src/runtime/runtime.c +++ b/src/runtime/runtime.c @@ -51,7 +51,6 @@ #include "arch.h" #include "gc.h" #include "interr.h" -#include "monitor.h" #include "validate.h" #include "core.h" #include "save.h" @@ -148,7 +147,7 @@ start it and work with the customary Lisp READ-EVAL-PRINT loop.\n\ \n\ One option idiom which is sometimes useful interactively (e.g. when\n\ exercising a test case for a bug report) is\n\ - sbcl --sysinit /dev/null --userinit /dev/null\n\ + sbcl --no-sysinit --no-userinit\n\ to keep SBCL from reading any initialization files at startup. And some\n\ people like to suppress the default startup message:\n\ sbcl --noinform\n\ @@ -272,6 +271,20 @@ main(int argc, char *argv[], char *envp[]) /* As in "--help" case, I think this is expected. */ print_version(); exit(0); + } else if (0 == strcmp(arg, "--debug-environment")) { + int n = 0; + printf("; Commandline arguments:\n"); + while (n < argc) { + printf("; %2d: \"%s\"\n", n, argv[n]); + ++n; + } + n = 0; + printf(";\n; Environment:\n"); + while (ENVIRON[n]) { + printf("; %2d: \"%s\"\n", n, ENVIRON[n]); + ++n; + } + ++argi; } else if (0 == strcmp(arg, "--end-runtime-options")) { end_runtime_options = 1; ++argi; @@ -357,7 +370,7 @@ main(int argc, char *argv[], char *envp[]) define_var("nil", NIL, 1); define_var("t", T, 1); - set_lossage_handler(monitor_or_something); + enable_lossage_handler(); globals_init(); @@ -365,8 +378,6 @@ main(int argc, char *argv[], char *envp[]) if (initial_function == NIL) { lose("couldn't find initial function\n"); } - SHOW("freeing core"); - free(core); gc_initialize_pointers(); @@ -378,6 +389,11 @@ main(int argc, char *argv[], char *envp[]) wos_install_interrupt_handlers(&exception_frame); #endif + /* Pass core filename into Lisp */ + SetSymbolValue(CORE_STRING, alloc_base_string(core),0); + SHOW("freeing core"); + free(core); + /* Convert remaining argv values to something that Lisp can grok. */ SHOW("setting POSIX-ARGV symbol value"); SetSymbolValue(POSIX_ARGV, alloc_base_string_list(sbcl_argv),0);