1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

ctdb-util: Fix warning about ignored result from system()

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2014-07-30 21:10:01 +10:00 committed by Amitay Isaacs
parent c1558adeaa
commit 2807b185f4

View File

@ -73,7 +73,7 @@ void ctdb_die(struct ctdb_context *ctdb, const char *msg)
*/
void ctdb_external_trace(void)
{
int ret;
const char * t = getenv("CTDB_EXTERNAL_TRACE");
char * cmd;
@ -83,7 +83,11 @@ void ctdb_external_trace(void)
cmd = talloc_asprintf(NULL, "%s %lu", t, (unsigned long) getpid());
DEBUG(DEBUG_WARNING,("begin external trace: %s\n", cmd));
system(cmd);
ret = system(cmd);
if (ret == -1) {
DEBUG(DEBUG_ERR,
("external trace command \"%s\" failed\n", cmd));
}
DEBUG(DEBUG_WARNING,("end external trace: %s\n", cmd));
talloc_free(cmd);
}