[ https://issues.apache.org/jira/browse/PIG-839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12717451#action_12717451 ]
Santhosh Srinivasan commented on PIG-839: ----------------------------------------- There are no unit test cases as the testing was performed manually. Pasting a test run below. {code} $ cat /errcode.pig a = load '/user/sms/data/student_tab.data' ; b = stream a through `false` ; store b into '/user/sms/data/errcode.out'; #Before fix $ java -cp pig.jar:/home/y/conf/pig/piglet/released org.apache.pig.Main -f errcode.pig 2009-06-08 14:40:51,917 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - Failed! 2009-06-08 14:40:51,926 [main] ERROR org.apache.pig.tools.grunt.GruntParser - ERROR 2055: Received Error while processing the map plan: 'false ' failed with exit status: 1 Details at logfile: pig_1244497222536.log afterside 14:40:53 ~/src_pig/pig/trunk_optimizer_phase3_part2 $ echo $? 0 #After fix $ java -cp pig.jar:/home/y/conf/pig/piglet/released org.apache.pig.Main -f /homes/sms/src_pig/pig/trunk_optimizer_phase3_part2/errcode.pig 2009-06-08 14:42:20,422 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - Failed! 2009-06-08 14:42:20,434 [main] ERROR org.apache.pig.tools.grunt.GruntParser - ERROR 2055: Received Error while processing the map plan: 'false ' failed with exit status: 1 Details at logfile: /homes/sms/src_commit/pig/trunk/pig_1244497306578.log afterside 14:42:21 ~/src_commit/pig/trunk $ echo $? 2 {code} > incorrect return codes on failure when using -f or -e flags > ----------------------------------------------------------- > > Key: PIG-839 > URL: https://issues.apache.org/jira/browse/PIG-839 > Project: Pig > Issue Type: Bug > Reporter: Gunther Hagleitner > Assignee: Gunther Hagleitner > Attachments: fix_return_code.patch > > > To repro: pig -e "a = load '<some file>' ; b = stream a through \`false\` ; > store b into '<some file>';" > Both the -e and -f flags do not return the right code upon exit. Running the > script w/o using -f works fine. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.