olga
Fri, 02 May 2008 13:11:46 -0700
Author: olga Date: Fri May 2 13:11:22 2008 New Revision: 652890 URL: http://svn.apache.org/viewvc?rev=652890&view=rev Log: PIG-224: generate correct error code on failure Modified: incubator/pig/trunk/CHANGES.txt incubator/pig/trunk/src/org/apache/pig/impl/streaming/ExecutableManager.java Modified: incubator/pig/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/incubator/pig/trunk/CHANGES.txt?rev=652890&r1=652889&r2=652890&view=diff ============================================================================== --- incubator/pig/trunk/CHANGES.txt (original) +++ incubator/pig/trunk/CHANGES.txt Fri May 2 13:11:22 2008 @@ -262,3 +262,5 @@ PIG-228: make multiple streaming outputs adhere to spec (acmurthy via olgan) + PIG-224: fix to error handling code to produce correct error code + Modified: incubator/pig/trunk/src/org/apache/pig/impl/streaming/ExecutableManager.java URL: http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/impl/streaming/ExecutableManager.java?rev=652890&r1=652889&r2=652890&view=diff ============================================================================== --- incubator/pig/trunk/src/org/apache/pig/impl/streaming/ExecutableManager.java (original) +++ incubator/pig/trunk/src/org/apache/pig/impl/streaming/ExecutableManager.java Fri May 2 13:11:22 2008 @@ -185,7 +185,13 @@ } finally { // Cleanup, release resources ... if (process != null) { - process.destroy(); + // Get the exit code + try { + exitCode = process.waitFor(); + } catch (InterruptedException ie) {} + + // Cleanup the process + process.destroy(); } if (stdoutThread != null) {