chiark / gitweb /
Improve doc comments.
[disorder] / server / state.c
index bd74b149f2fb977c22461243ddf201af38cfc3fe..74f156698f38bf433d4d88e983cc5c60e6ae3d96 100644 (file)
@@ -49,7 +49,23 @@ void quit(ev_source *ev) {
   info("shutting down...");
   quitting(ev);
   trackdb_close();
-  trackdb_deinit();
+  trackdb_deinit(ev);
+  /* Shutdown subprocesses.
+   *
+   * Subprocesses that use ev_child:
+   * - the speaker
+   * - the current rescan
+   * - any decoders
+   * - ...and players
+   * - the track picker
+   * - mail sender
+   * - the deadlock manager
+   *
+   * Subprocesses that don't:
+   * - any normalizers
+   * These are not shut down currently.
+   */
+  ev_child_killall(ev);
   info("exiting");
   exit(0);
 }
@@ -144,6 +160,7 @@ void reset_sockets(ev_source *ev) {
 }
 
 /** @brief Reconfigure the server
+ * @param ev Event loop
  * @param flags Flags
  * @return As config_read(); 0 on success, -1 if could not (re-)read config
  */