From b9fd3d2acfda5074d62e671c6edcdaed9fdc40c9 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 1 Mar 2011 02:32:50 +0000 Subject: Fix NSH redirection hang git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3326 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/ChangeLog | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'nuttx/ChangeLog') diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index cd2164dc9..c9be40c5d 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -1485,3 +1485,17 @@ * NSH: 'mem' command renamed to 'free'. Output is now more similar to the Linux 'free' command. + * NSH: Correct a redirection bug in NSH. The following would not work; it + resulted in a hang after the 'cat /dev/fifo': + + nsh> mkfile /dev/fifo + nsh> cd /tmp # /tmp is a mounted RAM disk + nsh> cat /dev/fifo > test.txt & + nsh> echo "This is a test" > /dev/fifo + + The error was caused because (1) there was a path that resulted in stdout + being closed (the "hang") and also (2) the 'cat' command was always outputting + to stdout, not to the redirected file descriptor. Now: + + nsh> cat test.txt + This is a test -- cgit v1.2.3