]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Log more information when we fail to terminate a process.
authorGeorge Kadianakis <desnacked@riseup.net>
Thu, 6 Sep 2012 14:03:11 +0000 (17:03 +0300)
committerGeorge Kadianakis <desnacked@riseup.net>
Thu, 6 Sep 2012 14:03:11 +0000 (17:03 +0300)
src/common/util.c

index ce672528529d6c3e649dd6b5581da6b7aeda6ab8..4b1bce88ea735693fcf5098bc4a447df83f9e6c1 100644 (file)
@@ -3897,10 +3897,15 @@ tor_process_handle_destroy(process_handle_t *process_handle,
 
   if (also_terminate_process) {
     if (tor_terminate_process(process_handle) < 0) {
-      log_notice(LD_GENERAL, "Failed to terminate process with PID '%d'",
-                 tor_process_get_pid(process_handle));
+      log_notice(LD_GENERAL, "Failed to terminate process with "
+                 "PID '%d' ('%s').", tor_process_get_pid(process_handle),
+#ifdef _WIN32
+                 format_win32_error(GetLastError()));
+#else
+                 strerror(errno));
+#endif
     } else {
-      log_info(LD_GENERAL, "Terminated process with PID '%d'",
+      log_info(LD_GENERAL, "Terminated process with PID '%d'.",
                tor_process_get_pid(process_handle));
     }
   }