stat: warn on failure to detach DU thread
[fio.git] / stat.c
diff --git a/stat.c b/stat.c
index 1ef88ddf69884b083c229032c08fb9df8b6f63cb..fbf0118c6d7ae1a4a895dc450cf808be7db4041c 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -1471,7 +1471,12 @@ void show_running_run_stats(void)
        fio_mutex_down(stat_mutex);
 
        if (!pthread_create(&thread, NULL, __show_running_run_stats, NULL)) {
-               pthread_detach(thread);
+               int err;
+
+               err = pthread_detach(thread);
+               if (err)
+                       log_err("fio: DU thread detach failed: %s\n", strerror(err));
+
                return;
        }