- SILC_LOG_DEBUG(("Start"));
-
- /* Flush log files */
- silc_log_flush_all();
-
- /* Gracefully stop the server */
- /* silc_server_stop(silcd); */
- /* XXX do this for now since doing graceful exit now can remove
- the scheduler underneath the server too early and crash it. */
- exit(0);
+ /* Stop scheduler, the program will stop eventually after noticing
+ that the scheduler is down. */
+ silc_schedule_stop(silcd->schedule);