You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by da...@apache.org on 2017/08/08 00:10:57 UTC

svn commit: r1804368 - in /pig/trunk: CHANGES.txt src/org/apache/pig/tools/grunt/ConsoleReaderInputStream.java

Author: daijy
Date: Tue Aug  8 00:10:57 2017
New Revision: 1804368

URL: http://svn.apache.org/viewvc?rev=1804368&view=rev
Log:
PIG-5254: Hit Ctrl-D to quit grunt shell fail

Modified:
    pig/trunk/CHANGES.txt
    pig/trunk/src/org/apache/pig/tools/grunt/ConsoleReaderInputStream.java

Modified: pig/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1804368&r1=1804367&r2=1804368&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Tue Aug  8 00:10:57 2017
@@ -65,6 +65,12 @@ PIG-5262: Fix jdiff related issues: fail
 PIG-5225: Several unit tests are not annotated with @Test (nkollar via rohini)
 
 
+Release 0.17.1 (unreleased)
+
+BUG FIXES
+
+PIG-5254: Hit Ctrl-D to quit grunt shell fail (wjqian via daijy)
+
 Release 0.17.0
  
 INCOMPATIBLE CHANGES

Modified: pig/trunk/src/org/apache/pig/tools/grunt/ConsoleReaderInputStream.java
URL: http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/tools/grunt/ConsoleReaderInputStream.java?rev=1804368&r1=1804367&r2=1804368&view=diff
==============================================================================
--- pig/trunk/src/org/apache/pig/tools/grunt/ConsoleReaderInputStream.java (original)
+++ pig/trunk/src/org/apache/pig/tools/grunt/ConsoleReaderInputStream.java Tue Aug  8 00:10:57 2017
@@ -21,7 +21,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.SequenceInputStream;
 import java.util.Enumeration;
-
 import jline.console.ConsoleReader;
 import jline.console.history.FileHistory;
 
@@ -104,7 +103,11 @@ public class ConsoleReaderInputStream ex
             }
 
             if (buffer == null) {
-                buffer = reader.readLine().getBytes();
+                //buffer = reader.readLine().getBytes();
+            	String buff = reader.readLine();
+            	if (buff == null){
+            		buff = "quit";}
+            	buffer = buff.getBytes();
 
                 //Write current grunt buffer to pig history file
                 ((FileHistory)reader.getHistory()).flush();