X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Ftools.c;h=87ff4a3b65f4fe9899cf8aebb6e99a40cd244221;hb=747a69435d9f83c0968d9689c4951bc0233ffc5e;hp=2da37234e2dd034ea8d5dd0f108eadcb8caf86bf;hpb=3612661714e86333ceacca7314959a5ed938dc6a;p=ccan diff --git a/tools/tools.c b/tools/tools.c index 2da37234..87ff4a3b 100644 --- a/tools/tools.c +++ b/tools/tools.c @@ -61,7 +61,7 @@ char *run_command(const void *ctx, const char *fmt, ...) /* Ensure stderr gets to us too. */ cmd = talloc_asprintf_append(cmd, " 2>&1"); - + pipe = popen(cmd, "r"); if (!pipe) return talloc_asprintf(ctx, "Failed to run '%s'", cmd); @@ -79,7 +79,8 @@ static int unlink_all(char *dir) { char cmd[strlen(dir) + sizeof("rm -rf ")]; sprintf(cmd, "rm -rf %s", dir); -// system(cmd); + if (system(cmd) != 0) + warn("Could not remove temporary work in %s", dir); return 0; }