]> git.pond.sub.org Git - empserver/blobdiff - include/empthread.h
(empth_init_signals): Don't catch SIGINT and SIGTERM.
[empserver] / include / empthread.h
index 4c952b405ea2824735e4d5095bb1e4d7190fc228..172e89a0d9917405b547620fd7ae693eee27b6d3 100644 (file)
@@ -144,6 +144,9 @@ empth_t *empth_self(void);
 
 /*
  * Terminate the current thread.
+ * The current thread should not be the thread that executed main().
+ * If it is, implementations may terminate the process rather than the
+ * thread.
  * Never returns.
  */
 void empth_exit(void);
@@ -184,6 +187,12 @@ void empth_wakeup(empth_t *thread);
  */
 void empth_sleep(time_t until);
 
+/*
+ * Wait for some implementation-defined external shutdown signal.
+ * Return a non-negative number identifying the signal.
+ */
+int empth_wait_for_shutdown(void);
+
 /*
  * Create a semaphore.
  * NAME is its name, it is used for debugging.