2004-05-04
2004-05-04 15:02:35 by Henrik Grubbström (Grubba) <grubba@grubba.org>
-
b21503b2bfafb7a71beff706336c2194e4c25921
(15 lines)
(+8/-7)
[
Show
| Annotate
]
Branch: 5.2
Added once_mode.
Rev: server/base_server/roxen.pike:1.872
6:
// Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others.
// ABS and suicide systems contributed freely by Francesco Chemolli
- constant cvs_version="$Id: roxen.pike,v 1.871 2004/05/04 10:59:03 grubba Exp $";
+ constant cvs_version="$Id: roxen.pike,v 1.872 2004/05/04 15:02:35 grubba Exp $";
//! @appears roxen
//!
102:
return fname-(getcwd()+"/");
}
+ static int once_mode;
+
// Note that 2.5 is a nonexisting version. It's only used for the
// cache static optimization for tags such as <if> and <emit> inside
// <cache> since that optimization can give tricky incompatibilities
433: Inside #if defined(THREADS)
#ifdef THREADS
catch (stop_handler_threads());
#endif /* THREADS */
- if (!exit_code) {
+ if (!exit_code || once_mode) {
// We're shutting down; Attempt to take mysqld with us.
catch { report_notice("Shutting down MySQL.\n"); };
catch {
443:
}
destruct (cache);
catch {
- #if 0
- if (exit_code)
+ if (exit_code && !once_mode)
report_notice("Restarting Roxen.\n");
else
report_notice("Shutting down Roxen.\n");
- #else
- report_notice("Restarting or shutting down Roxen.\n");
- #endif
+
};
roxenloader.real_exit( exit_code ); // Now we die...
}
4511:
mark_fd(1, "Stdout");
mark_fd(2, "Stderr");
+ once_mode = (int)Getopt.find_option(argv, "o", "once");
+
configuration_dir =
Getopt.find_option(argv, "d",({"config-dir","configuration-directory" }),
({ "ROXEN_CONFIGDIR", "CONFIGURATIONS" }), "../configurations");