From 74d9fdf56f1bb01e5e447986a49d3dbdb49a3f3d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 8 Oct 2013 12:15:52 +0100 Subject: [PATCH] df: parallel: Add a debug message when work function returns an error. Further attempts to find out why this hangs under Koji. --- df/parallel.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/df/parallel.c b/df/parallel.c index ef3137563..047735ef3 100644 --- a/df/parallel.c +++ b/df/parallel.c @@ -194,9 +194,15 @@ worker_thread (void *thread_data_vp) guestfs_set_verbose (g, thread_data->verbose); /* Do work. */ - if (thread_data->work (g, i, fp) == -1) + if (thread_data->work (g, i, fp) == -1) { thread_data->r = -1; + if (thread_data->verbose) + fprintf (stderr, + "parallel: thread %zu work function returned an error\n", + thread_data->thread_num); + } + fclose (fp); guestfs_close (g);