From d55bdffe2fe95f49f07d872f905efb9ea4f80f78 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 2 Mar 2009 01:57:10 +0000 Subject: [PATCH] report when chdir fails. [RT #19360] --- lib/tests/t_api.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/tests/t_api.c b/lib/tests/t_api.c index 09cea48114..2cdbeb4891 100644 --- a/lib/tests/t_api.c +++ b/lib/tests/t_api.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: t_api.c,v 1.63 2008/01/18 23:46:58 tbox Exp $ */ +/* $Id: t_api.c,v 1.64 2009/03/02 01:57:10 marka Exp $ */ /*! \file */ @@ -224,8 +224,10 @@ main(int argc, char **argv) { * Set cwd. */ - if (T_dir != NULL) - (void) chdir(T_dir); + if (T_dir != NULL && chdir(T_dir) != 0) { + fprintf(stderr, "chdir %s failed\n", T_dir); + exit(1); + } /* * We don't want buffered output.