Commit 6992a09e authored by Mukund Sivaraman's avatar Mukund Sivaraman

Check return value of system()

parent 41f859e5
......@@ -346,5 +346,6 @@ gegl_dot_node_to_png (GeglNode *node,
/* Create a png from it */
dot_cmd = g_strdup_printf ("dot -o %s -Tpng %s", png_path, dot_filename);
system (dot_cmd);
if (system (dot_cmd) == -1)
g_warning ("Error executing GraphViz dot program");
}
......@@ -59,7 +59,8 @@ gegl_introspect_load_cache (GeglChantO *op_introspect)
/* Process the .dot to a .png */
dot_cmd = g_strdup_printf ("dot -o %s -Tpng %s", png_filename, dot_filename);
system (dot_cmd);
if (system (dot_cmd) == -1)
g_warning ("Error executing GraphViz dot program");
/* Create a graph that loads the png into a GeglBuffer and process
* it
......
......@@ -50,7 +50,8 @@ load_cache (GeglChantO *op_magick_load)
filename = g_build_filename (g_get_tmp_dir (), "gegl-magick.png", NULL);
cmd = g_strdup_printf ("convert \"%s\"'[0]' \"%s\"",
op_magick_load->path, filename);
system (cmd);
if (system (cmd) == -1)
g_warning ("Error executing ImageMagick convert program");
graph = gegl_graph (sink=gegl_node ("gegl:buffer-sink", "buffer", &newbuf, NULL,
gegl_node ("gegl:png-load", "path", filename, NULL)));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment