Try to build PDB files even for releases.
[nssm.git] / service.h
index dd96f7c..46664de 100644 (file)
--- a/service.h
+++ b/service.h
@@ -61,6 +61,8 @@ typedef struct {
   unsigned long stdout_sharing;\r
   unsigned long stdout_disposition;\r
   unsigned long stdout_flags;\r
+  bool use_stdout_pipe;\r
+  HANDLE stdout_si;\r
   HANDLE stdout_pipe;\r
   HANDLE stdout_thread;\r
   unsigned long stdout_tid;\r
@@ -68,15 +70,22 @@ typedef struct {
   unsigned long stderr_sharing;\r
   unsigned long stderr_disposition;\r
   unsigned long stderr_flags;\r
+  bool use_stderr_pipe;\r
+  HANDLE stderr_si;\r
   HANDLE stderr_pipe;\r
   HANDLE stderr_thread;\r
   unsigned long stderr_tid;\r
+  bool hook_share_output_handles;\r
   bool rotate_files;\r
+  bool timestamp_log;\r
+  bool stdout_copy_and_truncate;\r
+  bool stderr_copy_and_truncate;\r
   unsigned long rotate_stdout_online;\r
   unsigned long rotate_stderr_online;\r
   unsigned long rotate_seconds;\r
   unsigned long rotate_bytes_low;\r
   unsigned long rotate_bytes_high;\r
+  unsigned long rotate_delay;\r
   unsigned long default_exit_action;\r
   unsigned long restart_delay;\r
   unsigned long throttle_delay;\r
@@ -91,17 +100,25 @@ typedef struct {
   HANDLE process_handle;\r
   unsigned long pid;\r
   HANDLE wait_handle;\r
+  unsigned long exitcode;\r
   bool stopping;\r
   bool allow_restart;\r
   unsigned long throttle;\r
   CRITICAL_SECTION throttle_section;\r
   bool throttle_section_initialised;\r
+  CRITICAL_SECTION hook_section;\r
+  bool hook_section_initialised;\r
   CONDITION_VARIABLE throttle_condition;\r
   HANDLE throttle_timer;\r
   LARGE_INTEGER throttle_duetime;\r
+  FILETIME nssm_creation_time;\r
   FILETIME creation_time;\r
   FILETIME exit_time;\r
   TCHAR *initial_env;\r
+  unsigned long last_control;\r
+  unsigned long start_requested_count;\r
+  unsigned long start_count;\r
+  unsigned long exit_count;\r
 } nssm_service_t;\r
 \r
 void WINAPI service_main(unsigned long, TCHAR **);\r
@@ -122,6 +139,8 @@ void cleanup_nssm_service(nssm_service_t *);
 SC_HANDLE open_service_manager(unsigned long);\r
 SC_HANDLE open_service(SC_HANDLE, TCHAR *, unsigned long, TCHAR *, unsigned long);\r
 QUERY_SERVICE_CONFIG *query_service_config(const TCHAR *, SC_HANDLE);\r
+int append_to_dependencies(TCHAR *, unsigned long, TCHAR *, TCHAR **, unsigned long *, int);\r
+int remove_from_dependencies(TCHAR *, unsigned long, TCHAR *, TCHAR **, unsigned long *, int);\r
 int set_service_dependencies(const TCHAR *, SC_HANDLE, TCHAR *);\r
 int get_service_dependencies(const TCHAR *, SC_HANDLE, TCHAR **, unsigned long *, int);\r
 int get_service_dependencies(const TCHAR *, SC_HANDLE, TCHAR **, unsigned long *);\r
@@ -129,12 +148,15 @@ int set_service_description(const TCHAR *, SC_HANDLE, TCHAR *);
 int get_service_description(const TCHAR *, SC_HANDLE, unsigned long, TCHAR *);\r
 int get_service_startup(const TCHAR *, SC_HANDLE, const QUERY_SERVICE_CONFIG *, unsigned long *);\r
 int get_service_username(const TCHAR *, const QUERY_SERVICE_CONFIG *, TCHAR **, size_t *);\r
+void set_service_environment(nssm_service_t *);\r
+void unset_service_environment(nssm_service_t *);\r
 int pre_install_service(int, TCHAR **);\r
 int pre_remove_service(int, TCHAR **);\r
 int pre_edit_service(int, TCHAR **);\r
 int install_service(nssm_service_t *);\r
 int remove_service(nssm_service_t *);\r
 int edit_service(nssm_service_t *, bool);\r
+int control_service(unsigned long, int, TCHAR **, bool);\r
 int control_service(unsigned long, int, TCHAR **);\r
 void set_service_recovery(nssm_service_t *);\r
 int monitor_service(nssm_service_t *);\r
@@ -142,6 +164,8 @@ int start_service(nssm_service_t *);
 int stop_service(nssm_service_t *, unsigned long, bool, bool);\r
 void CALLBACK end_service(void *, unsigned char);\r
 void throttle_restart(nssm_service_t *);\r
-int await_shutdown(nssm_service_t *, TCHAR *, unsigned long);\r
+int await_single_handle(SERVICE_STATUS_HANDLE, SERVICE_STATUS *, HANDLE, TCHAR *, TCHAR *, unsigned long);\r
+int list_nssm_services(int, TCHAR **);\r
+int service_process_tree(int, TCHAR **);\r
 \r
 #endif\r