Roxen.git / server / base_server / roxen.pike

version» Context lines:

Roxen.git/server/base_server/roxen.pike:502:    master()->handle_error (err);   #endif    roxenloader.real_exit( exit_code ); // Now we die...   }      private int shutdown_recurse;      // Shutdown Roxen   // exit_code = 0 True shutdown   // exit_code = -1 Restart - private void low_shutdown(int exit_code) + private void low_shutdown(int exit_code, int|void apply_patches)   {    if(shutdown_recurse >= 4)    {    if (mixed err =    catch (report_notice("Exiting roxen (spurious signals received).\n")) ||    catch (stop_all_configurations()))    master()->handle_error (err);    // Zap some of the remaining caches.    destruct(argcache);    destruct(cache);
Roxen.git/server/base_server/roxen.pike:530:   #endif /* THREADS */    roxenloader.real_exit(exit_code);    }    if (shutdown_recurse++) return;      #ifndef NO_SLOW_REQ_BT    // Turn off the backend thread monitor while we're shutting down.    slow_be_timeout_changed();   #endif    -  if (query("patch_on_restart")) { +  if ((apply_patches || query("patch_on_restart")) > 0) {    mixed err = catch {    foreach(plib->file_list_imported(), mapping(string:mixed) item) {    report_notice("Applying patch %s...\n", item->metadata->id);    mixed err = catch {    plib->install_patch(item->metadata->id,    "Internal Administrator");    };    if (err) {    report_error("Failed to install patch %s: %s\n",    item->metadata->id,
Roxen.git/server/base_server/roxen.pike:568:   #endif       call_out(really_low_shutdown, 0.1, exit_code);   }      private int shutdown_started;      // Perhaps somewhat misnamed, really... This function will close all   // listen ports and then quit. The 'start' script should then start a   // new copy of roxen automatically. - void restart(float|void i, void|int exit_code) + void restart(float|void i, void|int exit_code, void|int apply_patches)   //! Restart roxen, if the start script is running   {    shutdown_started = 1; -  call_out(low_shutdown, i, exit_code || -1); +  call_out(low_shutdown, i, exit_code || -1, apply_patches);   }    - void shutdown(float|void i) + void shutdown(float|void i, void|int apply_patches)   //! Shut down roxen   {    shutdown_started = 1; -  call_out(low_shutdown, i, 0); +  call_out(low_shutdown, i, 0, apply_patches);   }      void exit_when_done()   {    shutdown_started = 1;    report_notice("Interrupt request received.\n");    low_shutdown(-1);   }      int is_shutting_down()