about summary refs log tree commit diff stats
path: root/xombrero.c
diff options
context:
space:
mode:
authorMarco Peereboom <marco@conformal.com>2012-07-03 13:27:31 -0500
committerMarco Peereboom <marco@conformal.com>2012-07-03 13:27:31 -0500
commitdc91a0461fc11d506dc2292a1ab46a313c455a4d (patch)
tree530e108884d381e03bcf8632163a5433b4850732 /xombrero.c
parentee149197306cf8d51835d5aacb689bff3d171b27 (diff)
downloadxombrero-dc91a0461fc11d506dc2292a1ab46a313c455a4d.tar.gz
print gerror when spawn fails
Diffstat (limited to 'xombrero.c')
-rw-r--r--xombrero.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/xombrero.c b/xombrero.c
index 6af1bb9..c282d5b 100644
--- a/xombrero.c
+++ b/xombrero.c
@@ -1440,8 +1440,8 @@ run_page_script(struct tab *t, struct karg *args)
 		show_oops(t, "%s: could not spawn process", __func__);
 		return (1);
 	}
+
 	return (0);
-	
 }
 
 int
@@ -4949,6 +4949,7 @@ run_mimehandler(struct tab *t, char *mime_type, WebKitNetworkRequest *request)
 {
 	struct mime_type	*m;
 	char			*sv[3];
+	GError			*gerr = NULL;
 
 	m = find_mime_type(mime_type);
 	if (m == NULL)
@@ -4960,9 +4961,10 @@ run_mimehandler(struct tab *t, char *mime_type, WebKitNetworkRequest *request)
 	sv[1] = (char *)webkit_network_request_get_uri(request);
 	sv[2] = NULL;
 	if (!g_spawn_async(NULL, sv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL,
-	    NULL, NULL))
+	    NULL, &gerr))
 		/* No show_oops here to handle "donothing" example in config */
-		warnx("%s: could not spawn process", __func__);
+		warnx("%s: could not spawn process (%s)", __func__,
+		    gerr ? gerr->message : "N/A");
 	return (0);
 }