Hi all, I'm not sure whether I should post this here. Sorry if disturb.
We met a very strange problem with bash "version 3.00.15(1)-release". We are using a hadoop-test script to test whether a file exists on HDFS. But we observed several times that the hadoop-test script, which is a subscript in a control-flow script, returned unexpectly. It seems the subscript was put in background, and the main-control script just go on and got a wrong return value. We added some debug log in the hadoop-test script, and it looks like this: ============== sh -x DEBUG LOG ============== + /home/work/hadoop-client/hadoop/bin/hadoop dfs -test -e xxxFile + '[' 0 -ne 0 ']' # this is unexpected, the real return value is 1 + some other things... + ... + ... + test: File does not exists: xxxFile # this is unexpeted, should be printed before the condition statement. Looks like test script goes to background + ... ============================================= This problem bothered us for several months because we have a large cluster with thousands of nodes running the hadoop-test script. We met this case every month. Anybody ever met the same problem? Thanks, Zhong